@Loggable(value=1) public final class MkGrizzlyContainer extends Object implements MkContainer
MkContainer
based on Grizzly Server.MkContainer
,
ExamplesConstructor and Description |
---|
MkGrizzlyContainer() |
Modifier and Type | Method and Description |
---|---|
URI |
home()
Get its home.
|
MkContainer |
next(MkAnswer answer)
Give this answer on the next request.
|
int |
queries()
How many queries we have left.
|
MkContainer |
start()
Start it on the first available TCP port.
|
MkContainer |
start(int prt)
Start it on a provided port.
|
void |
stop()
Stop container.
|
MkQuery |
take()
Get the oldest request received
(
NoSuchElementException
if no more elements in the list). |
public MkContainer next(MkAnswer answer)
MkContainer
next
in interface MkContainer
answer
- Next answer to givepublic MkQuery take()
MkContainer
NoSuchElementException
if no more elements in the list).take
in interface MkContainer
public int queries()
MkContainer
queries
in interface MkContainer
MkContainer.take()
public MkContainer start() throws IOException
MkContainer
start
in interface MkContainer
IOException
- If failspublic MkContainer start(int prt) throws IOException
MkContainer
start
in interface MkContainer
prt
- The port where it should start listeningIOException
- If failspublic void stop()
MkContainer
stop
in interface MkContainer
public URI home()
MkContainer
home
in interface MkContainer
Copyright © 2012–2014 jcabi.com. All rights reserved.