Interface NIOClientSocketHandler
-
- All Known Implementing Classes:
NIOTcpPacketTransport
public interface NIOClientSocketHandlerNIOClientSocketHandler
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanappendOutgoingData()Append some outgoing data to the output bufferStringgetId()Get the unique client identifierByteBuffergetInputBuffer()Get this client's input bufferByteBuffergetOutputBuffer()Get this client's output bufferSocketChannelgetSocketChannel()Get the associated socket channelbooleanhandleIncomingData()Process incoming data available in the input bufferbooleanhasWriteInterest()Test if this client has things to sendsvoidonSocketChannelClosed()Called if the multiplexer closes the socket channel after a network error
-
-
-
Method Detail
-
getId
String getId()
Get the unique client identifier- Returns:
- the unique client identifier
-
getSocketChannel
SocketChannel getSocketChannel()
Get the associated socket channel- Returns:
- the associated socket channel
-
getInputBuffer
ByteBuffer getInputBuffer()
Get this client's input buffer- Returns:
- this client's input buffer
-
getOutputBuffer
ByteBuffer getOutputBuffer()
Get this client's output buffer- Returns:
- this client's output buffer
-
handleIncomingData
boolean handleIncomingData()
Process incoming data available in the input buffer- Returns:
- false on error causing the multiplexer to drop the client handler
-
appendOutgoingData
boolean appendOutgoingData()
Append some outgoing data to the output buffer- Returns:
- false on error causing the multiplexer to drop the client handler
-
hasWriteInterest
boolean hasWriteInterest()
Test if this client has things to sends- Returns:
- true if this client has things to sends
-
onSocketChannelClosed
void onSocketChannelClosed()
Called if the multiplexer closes the socket channel after a network error
-
-