public class TransportSocketProcessor extends Object implements SocketProcessor
TransportSocketProcessor
is used to convert sockets
to transports. This acts as an adapter to a transport processor
which converts a connected socket to a Transport
that
can be used to read and write data. Depending on whether there is
an SSLEngine
associated with the socket or not, there
could be an SSL handshake performed.Constructor and Description |
---|
TransportSocketProcessor(TransportProcessor processor)
Constructor for the
TransportSocketProcessor object. |
TransportSocketProcessor(TransportProcessor processor,
int threads)
Constructor for the
TransportSocketProcessor object. |
TransportSocketProcessor(TransportProcessor processor,
int threads,
int buffer)
Constructor for the
TransportSocketProcessor object. |
TransportSocketProcessor(TransportProcessor processor,
int threads,
int buffer,
int threshold)
Constructor for the
TransportSocketProcessor object. |
TransportSocketProcessor(TransportProcessor processor,
int threads,
int buffer,
int threshold,
boolean client)
Constructor for the
TransportSocketProcessor object. |
Modifier and Type | Method and Description |
---|---|
void |
process(Socket socket)
Used to connect the
Socket which is a full duplex
TCP connection to a higher layer the application. |
void |
stop()
This is implemented to shut down the server asynchronously.
|
public TransportSocketProcessor(TransportProcessor processor) throws IOException
TransportSocketProcessor
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 transportsIOException
public TransportSocketProcessor(TransportProcessor processor, int threads) throws IOException
TransportSocketProcessor
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 useIOException
public TransportSocketProcessor(TransportProcessor processor, int threads, int buffer) throws IOException
TransportSocketProcessor
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 usebuffer
- this is the initial size of the output bufferIOException
public TransportSocketProcessor(TransportProcessor processor, int threads, int buffer, int threshold) throws IOException
TransportSocketProcessor
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 usebuffer
- this is the initial size of the output bufferthreshold
- this is the maximum size of the output bufferIOException
public TransportSocketProcessor(TransportProcessor processor, int threads, int buffer, int threshold, boolean client) throws IOException
TransportSocketProcessor
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 usebuffer
- this is the initial size of the output bufferthreshold
- this is the maximum size of the output bufferclient
- determines if the SSL handshake is for a clientIOException
public void process(Socket socket) throws IOException
Socket
which is a full duplex
TCP connection to a higher layer the application. It is this
layer that is responsible for interpreting a protocol or handling
messages in some manner. In the case of HTTP this will initiate
the consumption of a HTTP request after any SSL handshake is
finished if the connection is secure.process
in interface SocketProcessor
socket
- this is the connected HTTP pipeline to processIOException
public void stop() throws IOException
stop
in interface SocketProcessor
IOException
Copyright © 2016. All rights reserved.