|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.officefloor.plugin.socket.server.ssl.protocol.SslConnectionHandler<CH>
public class SslConnectionHandler<CH extends ConnectionHandler>
SSL ConnectionHandler.
| Constructor Summary | |
|---|---|
SslConnectionHandler(Connection connection,
SSLEngine engine,
BufferSquirtFactory bufferSquirtFactory,
SslTaskExecutor taskExecutor,
ServerSocketHandler<CH> wrappedServerSocketHandler)
Initiate. |
|
| Method Summary | |
|---|---|
byte[] |
createDestinationByteArray(int minimumSize)
Creates a byte array that will be at least the size
specified (it may however be bigger to allow reuse of
byte array instances). |
byte[] |
createSourceByteArray(int minimumSize)
Creates a byte array that will be at least the size
specified (it may however be bigger to allow reuse of
byte array instances). |
Object |
getContextObject()
Obtains the context bound object. |
InputBufferStream |
getInputBufferStream()
Obtains the InputBufferStream to read data from the client. |
long |
getTime()
Obtains the current time in milliseconds. |
CH |
getWrappedConnectionHandler()
Obtains the wrapped ConnectionHandler. |
void |
handleIdleConnection(IdleContext context)
Handles a Connection being idled. |
void |
handleRead(ReadContext context)
Handles a read from the SocketChannel. |
void |
handleWrite(WriteContext context)
Handles a potential write to the SocketChannel. |
void |
processRequest(Object attachment)
Flags that the request has been received. |
void |
setCloseConnection(boolean isClose)
Flags to close the Connection. |
void |
setContextObject(Object contextObject)
Specifies the context bound object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SslConnectionHandler(Connection connection,
SSLEngine engine,
BufferSquirtFactory bufferSquirtFactory,
SslTaskExecutor taskExecutor,
ServerSocketHandler<CH> wrappedServerSocketHandler)
connection - Connection.engine - SSLEngine.bufferSquirtFactory - BufferSquirtFactory.taskExecutor - SslTaskExecutor.wrappedServerSocketHandler - Wrapped ServerSocketHandler.| Method Detail |
|---|
public CH getWrappedConnectionHandler()
ConnectionHandler.
ConnectionHandler.
public void handleRead(ReadContext context)
throws IOException
ConnectionHandlerSocketChannel.
handleRead in interface ConnectionHandlercontext - ReadContext.
IOException - If fails to obtain data from the ReadContext.
public void handleWrite(WriteContext context)
throws IOException
ConnectionHandlerSocketChannel.
handleWrite in interface ConnectionHandlercontext - WriteContext.
IOException - If fails to handle write.
public void handleIdleConnection(IdleContext context)
throws IOException
ConnectionHandlerConnection being idled.
handleIdleConnection in interface ConnectionHandlercontext - IdleContext.
IOException - If fails to handle idle Connection. Possibly from
attempting to close it.public byte[] createDestinationByteArray(int minimumSize)
TemporaryByteArrayFactory
Creates a byte array that will be at least the size
specified (it may however be bigger to allow reuse of
byte array instances).
This will always be a different byte array to that returned
from other methods of this interface.
createDestinationByteArray in interface TemporaryByteArrayFactoryminimumSize - Minimum size for the returned byte array.
byte array.public byte[] createSourceByteArray(int minimumSize)
TemporaryByteArrayFactory
Creates a byte array that will be at least the size
specified (it may however be bigger to allow reuse of
byte array instances).
This will always be a different byte array to that returned
from other methods of this interface.
createSourceByteArray in interface TemporaryByteArrayFactoryminimumSize - Minimum size for the returned byte array.
byte array.public long getTime()
ConnectionHandlerContextObtains the current time in milliseconds.
This should return similar to System.currentTimeMillis() but is
provided to cache time for multiple quick operations that require only
estimates of time.
Note CPU operations should be in the nanoseconds.
getTime in interface ConnectionHandlerContextpublic void setCloseConnection(boolean isClose)
ConnectionHandlerContextConnection.
setCloseConnection in interface ConnectionHandlerContextisClose - true to close the Connection.public Object getContextObject()
ConnectionHandlerContext
getContextObject in interface ConnectionHandlerContextpublic void setContextObject(Object contextObject)
ConnectionHandlerContext
setContextObject in interface ConnectionHandlerContextcontextObject - Context bound object.public InputBufferStream getInputBufferStream()
ReadContextInputBufferStream to read data from the client.
getInputBufferStream in interface ReadContextInputBufferStream.
public void processRequest(Object attachment)
throws IOException
ReadContextServer process the request.
processRequest in interface ReadContextattachment - Optional attachment for the request. May be null.
IOException - If fails to process request.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||