A specialized version of SocketChannelEndPoint that supports NetworkTrafficListeners.
| Modifier and Type | Field and Description |
|---|---|
| private final NetworkTrafficListener | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| public | NetworkTrafficSocketChannelEndPoint(SocketChannel channel, ManagedSelector selectSet, SelectionKey key, Scheduler scheduler, long idleTimeout, NetworkTrafficListener listener)
|
| Modifier and Type | Method and Description |
|---|---|
| public int | fill(ByteBuffer
The buffer to fill. The position and limit are modified during the fill. After the
operation, the position is unchanged and the limit is increased to reflect the new data filled. buffer)Overrides org. Overrides default org. Fill the passed buffer with data from this endpoint. |
| public boolean | flush(ByteBuffer...
the buffers to flush buffers)Overrides org. Overrides default org. Flush data from the passed header/buffer to this endpoint. |
| public void | |
| public void | |
| public void | onClose(Throwable
The reason for the close, or null if a normal close. failure)Overrides org. Implements org. Callback method invoked when this |
| public void | onOpen()
Overrides org. Implements org. Callback method invoked when this EndPoint is opened. |
| listener | back to summary |
|---|---|
| private final NetworkTrafficListener listener | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG | |
| NetworkTrafficSocketChannelEndPoint | back to summary |
|---|---|
| public NetworkTrafficSocketChannelEndPoint(SocketChannel channel, ManagedSelector selectSet, SelectionKey key, Scheduler scheduler, long idleTimeout, NetworkTrafficListener listener) | |
| fill | back to summary |
|---|---|
| public int fill(ByteBuffer buffer) throws IOException Overrides org. Overrides default org. Doc from org. Fill the passed buffer with data from this endpoint. The bytes are appended to any data already in the buffer by writing from the buffers limit up to it's capacity. The limit is updated to include the filled bytes.
| |
| flush | back to summary |
|---|---|
| public boolean flush(ByteBuffer... buffers) throws IOException Overrides org. Overrides default org. Doc from org. Flush data from the passed header/buffer to this endpoint. As many bytes as can be consumed are taken from the header/buffer position up until the buffer limit. The header/buffers position is updated to indicate how many bytes have been consumed.
| |
| notifyIncoming | back to summary |
|---|---|
| public void notifyIncoming(ByteBuffer buffer, int read) | |
| notifyOutgoing | back to summary |
|---|---|
| public void notifyOutgoing(ByteBuffer view) | |
| onClose | back to summary |
|---|---|
| public void onClose(Throwable failure) Overrides org. Implements org. Doc from org. Callback method invoked when this | |
| onOpen | back to summary |
|---|---|
| public void onOpen() Overrides org. Implements org. Doc from org. Callback method invoked when this EndPoint is opened.
| |