|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.simpleframework.http.core.ContainerProcessor
public class ContainerProcessor
The ContainerProcessor
object is used to create
channels which can be used to consume and process requests. This
is basically an adapter to the Selector
which will
convert the provided transport to a usable channel. Each of the
connected pipelines will end up at this object, regardless of
whether those connections are SSL or plain data.
Constructor Summary | |
---|---|
ContainerProcessor(Container container,
Allocator allocator,
int count)
Constructor for the ContainerProcessor object. |
|
ContainerProcessor(Container container,
Allocator allocator,
int count,
int select)
Constructor for the ContainerProcessor object. |
Method Summary | |
---|---|
void |
process(Transport transport)
This is used to process the requests from a provided transport and deliver a response to those requests. |
void |
stop()
This method is used to stop the Processor such
that it will accept no more pipelines. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ContainerProcessor(Container container, Allocator allocator, int count) throws java.io.IOException
ContainerProcessor
object.
This is used to create a processor which will convert the
provided transport objects to channels, which can then be
processed by the selector and dispatched to the container.
container
- the container to dispatch requests toallocator
- this is the allocator used to buffer datacount
- this is the number of threads to be used
java.io.IOException
public ContainerProcessor(Container container, Allocator allocator, int count, int select) throws java.io.IOException
ContainerProcessor
object.
This is used to create a processor which will convert the
provided transport objects to channels, which can then be
processed by the selector and dispatched to the container.
container
- the container to dispatch requests toallocator
- this is the allocator used to buffer datacount
- this is the number of threads to be usedselect
- this is the number of selector threads to use
java.io.IOException
Method Detail |
---|
public void process(Transport transport) throws java.io.IOException
Typical usage of this method is to accept multiple transport objects, each representing a unique HTTP channel to the client, and process requests from those transports concurrently.
process
in interface Processor
transport
- the transport to process requests from
java.io.IOException
public void stop() throws java.io.IOException
Processor
such
that it will accept no more pipelines. Stopping the processor
ensures that all resources occupied will be released. This is
required so that all threads are stopped and released.
Typically this method is called once all connections to the server have been stopped. As a final act of shutting down the entire server all threads must be stopped, this allows collection of unused memory and the closing of file and socket resources.
stop
in interface Processor
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |