|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.officefloor.plugin.socket.server.impl.ConnectionImpl<CH>
public class ConnectionImpl<CH extends ConnectionHandler>
Implementation of a Connection.
| Constructor Summary | |
|---|---|
ConnectionImpl(NonblockingSocketChannel nonblockingSocketChannel,
ServerSocketHandler<CH> serverSocketHandler,
BufferSquirtFactory bufferSquirtFactory)
Initiate. |
|
| Method Summary | |
|---|---|
InputBufferStream |
getInputBufferStream()
Obtains the InputBufferStream to obtain data from the client. |
InetSocketAddress |
getLocalAddress()
Obtains the local address for the Connection. |
Object |
getLock()
Obtains the lock to synchronize for using this
Connection. |
OutputBufferStream |
getOutputBufferStream()
Obtains the OutputBufferStream to write data to the client. |
InetSocketAddress |
getRemoteAddress()
Obtains the remote address for the Connection. |
boolean |
isSecure()
Indicates if the connection is over a secure channel (e.g. |
void |
populate(ByteBuffer buffer)
Populates the ByteBuffer. |
void |
process(ByteBuffer buffer)
Processes the ByteBuffer from the InputBufferStream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConnectionImpl(NonblockingSocketChannel nonblockingSocketChannel,
ServerSocketHandler<CH> serverSocketHandler,
BufferSquirtFactory bufferSquirtFactory)
nonblockingSocketChannel - NonblockingSocketChannel.serverSocketHandler - ServerSocketHandler.bufferSquirtFactory - BufferSquirtFactory.| Method Detail |
|---|
public void populate(ByteBuffer buffer)
throws IOException
BufferPopulatorByteBuffer.
populate in interface BufferPopulatorbuffer - ByteBuffer to be populated.
IOException - Failure to populate the ByteBuffer.
public void process(ByteBuffer buffer)
throws IOException
BufferProcessorByteBuffer from the InputBufferStream.
process in interface BufferProcessorbuffer - ByteBuffer from the InputBufferStream.
IOException - If fails to process the ByteBuffer.public Object getLock()
Connectionsynchronize for using this
Connection.
getLock in interface ConnectionConnection.public InetSocketAddress getLocalAddress()
ConnectionConnection.
getLocalAddress in interface ConnectionInetSocketAddress describing the local Socket for
the Connection.public InetSocketAddress getRemoteAddress()
ConnectionConnection.
getRemoteAddress in interface ConnectionInetSocketAddress describing the remote Socket
for the Connection.public boolean isSecure()
Connection
isSecure in interface Connectiontrue if connection is over a secure channel.public InputBufferStream getInputBufferStream()
ConnectionInputBufferStream to obtain data from the client.
getInputBufferStream in interface ConnectionInputBufferStream.public OutputBufferStream getOutputBufferStream()
ConnectionOutputBufferStream to write data to the client.
getOutputBufferStream in interface ConnectionOutputBufferStream.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||