|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.simpleframework.transport.ProcessorServer
public class ProcessorServer
The ProcessorServer is used to convert pipelines
to transports. This simply acts as an adapter to a processor
which converts a connected pipeline to a Transport
which can be used to read and write data. Conversion of the
pipeline is performed only once per connection.
| Constructor Summary | |
|---|---|
ProcessorServer(Processor processor)
Constructor for the ProcessorServer object. |
|
ProcessorServer(Processor processor,
int threads)
Constructor for the ProcessorServer object. |
|
ProcessorServer(Processor processor,
int threads,
int threshold)
Constructor for the ProcessorServer object. |
|
ProcessorServer(Processor processor,
int threads,
int threshold,
int buffer)
Constructor for the ProcessorServer object. |
|
ProcessorServer(Processor processor,
int threads,
int threshold,
int buffer,
int queue)
Constructor for the ProcessorServer object. |
|
ProcessorServer(Processor processor,
int threads,
int threshold,
int buffer,
int queue,
boolean client)
Constructor for the ProcessorServer object. |
|
| Method Summary | |
|---|---|
void |
process(Socket socket)
Used to process the Pipeline which is a full duplex
communication link that may contain several HTTP 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 ProcessorServer(Processor processor)
throws IOException
ProcessorServer object.
The transport processor is used to process plain connections
and wrap those connections in a Transport that
can be used to send and receive data to and from.
processor - this is used to process transports
IOException
public ProcessorServer(Processor processor,
int threads)
throws IOException
ProcessorServer object.
The transport processor is used to process plain connections
and wrap those connections in a Transport that
can be used to send and receive data to and from.
processor - this is used to process transportsthreads - this is the number of threads this will use
IOException
public ProcessorServer(Processor processor,
int threads,
int threshold)
throws IOException
ProcessorServer object.
The transport processor is used to process plain connections
and wrap those connections in a Transport that
can be used to send and receive data to and from.
processor - this is used to process transportsthreads - this is the number of threads this will usethreshold - number of bytes that can be copied for queuing
IOException
public ProcessorServer(Processor processor,
int threads,
int threshold,
int buffer)
throws IOException
ProcessorServer object.
The transport processor is used to process plain connections
and wrap those connections in a Transport that
can be used to send and receive data to and from.
processor - this is used to process transportsthreads - this is the number of threads this will usethreshold - number of bytes that can be copied for queuingbuffer - this is the size of the buffers for the transport
IOException
public ProcessorServer(Processor processor,
int threads,
int threshold,
int buffer,
int queue)
throws IOException
ProcessorServer object.
The transport processor is used to process plain connections
and wrap those connections in a Transport that
can be used to send and receive data to and from.
processor - this is used to process transportsthreads - this is the number of threads this will usethreshold - number of bytes that can be copied for queuingbuffer - this is the size of the buffers for the transportqueue - this is the number of buffers that can be queued
IOException
public ProcessorServer(Processor processor,
int threads,
int threshold,
int buffer,
int queue,
boolean client)
throws IOException
ProcessorServer object.
The transport processor is used to process plain connections
and wrap those connections in a Transport that
can be used to send and receive data to and from.
processor - this is used to process transportsthreads - this is the number of threads this will usethreshold - number of bytes that can be copied for queuingbuffer - this is the size of the buffers for the transportqueue - this is the number of buffers that can be queuedclient - determines if the SSL handshake is for a client
IOException| Method Detail |
|---|
public void process(Socket socket)
throws IOException
Pipeline which is a full duplex
communication link that may contain several HTTP requests. This
will be used to read the requests from the Pipeline
and to pass these requests to a Container for
processing.
Typical usage of this method is to accept multiple pipeline objects, each representing a unique HTTP channel to the client, and process requests from those pipelines concurrently.
process in interface Serversocket - this is the connected HTTP pipeline to process
IOException
public void stop()
throws 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 all memory is 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.
This is implemented to shut down the server asynchronously. It will start a process to perform the shutdown. Asynchronous shutdown allows a server resource executed via a HTTP request can stop the server without any danger of killing itself or even worse causing a deadlock.
stop in interface ServerIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||