|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.simpleframework.http.core.ContainerSocketProcessor
public class ContainerSocketProcessor
The ContainerSocketProcessor object is a connector
that dispatch requests from a connected pipeline. SSL connections
and plain connections can be processed by this implementation. It
collects data from the connected pipelines and constructs the
requests and responses used to dispatch to the container.
In order to process the requests this uses two thread pools. One is used to collect data from the pipelines and create the requests. The other is used to service those requests. Such an architecture ensures that the serving thread does not have to deal with I/O operations. All data is consumed before it is serviced.
| Constructor Summary | |
|---|---|
ContainerSocketProcessor(Container container)
Constructor for the ContainerSocketProcessor object. |
|
ContainerSocketProcessor(Container container,
Allocator allocator)
Constructor for the ContainerSocketProcessor object. |
|
ContainerSocketProcessor(Container container,
Allocator allocator,
int count)
Constructor for the ContainerSocketProcessor object. |
|
ContainerSocketProcessor(Container container,
Allocator allocator,
int count,
int select)
Constructor for the ContainerSocketProcessor object. |
|
ContainerSocketProcessor(Container container,
int count)
Constructor for the ContainerSocketProcessor object. |
|
ContainerSocketProcessor(Container container,
int count,
int select)
Constructor for the ContainerSocketProcessor object. |
|
| Method Summary | |
|---|---|
void |
process(Socket socket)
This is used to consume HTTP messages that arrive on the socket and dispatch them to the internal container. |
void |
stop()
This method is used to stop the connector in such a way that it will not accept and process any further messages. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ContainerSocketProcessor(Container container)
throws IOException
ContainerSocketProcessor object.
The connector created will collect HTTP requests from the pipelines
provided and dispatch those requests to the provided container.
container - this is the container used to service requests
IOException
public ContainerSocketProcessor(Container container,
int count)
throws IOException
ContainerSocketProcessor object.
The connector created will collect HTTP requests from the pipelines
provided and dispatch those requests to the provided container.
container - this is the container used to service requestscount - this is the number of threads used for each pool
IOException
public ContainerSocketProcessor(Container container,
int count,
int select)
throws IOException
ContainerSocketProcessor object. The
connector created will collect HTTP requests from the pipelines
provided and dispatch those requests to the provided container.
container - this is the container used to service requestscount - this is the number of threads used for each poolselect - this is the number of selector threads to use
IOException
public ContainerSocketProcessor(Container container,
Allocator allocator)
throws IOException
ContainerSocketProcessor object.
The connector created will collect HTTP requests from the pipelines
provided and dispatch those requests to the provided container.
container - this is the container used to service requestsallocator - this is the allocator used to create buffers
IOException
public ContainerSocketProcessor(Container container,
Allocator allocator,
int count)
throws IOException
ContainerSocketProcessor object.
The connector created will collect HTTP requests from the pipelines
provided and dispatch those requests to the provided container.
container - this is the container used to service requestsallocator - this is the allocator used to create bufferscount - this is the number of threads used for each pool
IOException
public ContainerSocketProcessor(Container container,
Allocator allocator,
int count,
int select)
throws IOException
ContainerSocketProcessor object.
The connector created will collect HTTP requests from the pipelines
provided and dispatch those requests to the provided container.
container - this is the container used to service requestsallocator - this is the allocator used to create bufferscount - this is the number of threads used for each poolselect - this is the number of selector threads to use
IOException| Method Detail |
|---|
public void process(Socket socket)
throws IOException
SSLEngine an SSL handshake may
be performed before any HTTP messages are consumed. This can be
called from multiple threads and does not block.
process in interface SocketProcessorsocket - this is the connected HTTP pipeline to process
IOException
public void stop()
throws IOException
stop in interface SocketProcessorIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||