Package org.simpleframework.http.core
Class ContainerTransportProcessor
java.lang.Object
org.simpleframework.http.core.ContainerTransportProcessor
- All Implemented Interfaces:
TransportProcessor
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.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Controller
This is the controller used to process the created channels. -
Constructor Summary
ConstructorsConstructorDescriptionContainerTransportProcessor
(Container container, Allocator allocator, int count) Constructor for theContainerProcessor
object.ContainerTransportProcessor
(Container container, Allocator allocator, int count, int select) Constructor for theContainerProcessor
object. -
Method Summary
-
Field Details
-
controller
This is the controller used to process the created channels.
-
-
Constructor Details
-
ContainerTransportProcessor
public ContainerTransportProcessor(Container container, Allocator allocator, int count) throws IOException Constructor for theContainerProcessor
object. This is used to create a processor which will convert the provided transport objects to channels, which can then be processed by the controller and dispatched to the container.- Parameters:
container
- the container to dispatch requests toallocator
- this is the allocator used to buffer datacount
- this is the number of threads to be used- Throws:
IOException
-
ContainerTransportProcessor
public ContainerTransportProcessor(Container container, Allocator allocator, int count, int select) throws IOException Constructor for theContainerProcessor
object. This is used to create a processor which will convert the provided transport objects to channels, which can then be processed by the controller and dispatched to the container.- Parameters:
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 controller threads to use- Throws:
IOException
-
-
Method Details
-
process
This is used to consume HTTP messages that arrive on the given transport. All messages consumed from the transport are then handed to theContainer
for processing. The response will also be delivered over the provided transport. At this point the SSL handshake will have fully completed.- Specified by:
process
in interfaceTransportProcessor
- Parameters:
transport
- the transport to process requests from- Throws:
IOException
-
stop
This method is used to stop the connector in such a way that it will not accept and process any further messages. If there are resources to clean up they may be cleaned up asynchronously so that this method can return without blocking.- Specified by:
stop
in interfaceTransportProcessor
- Throws:
IOException
-