public class NetworkTrafficSelectChannelEndPoint extends SelectChannelEndPoint
| Constructor and Description |
|---|
NetworkTrafficSelectChannelEndPoint(SocketChannel channel,
SelectorManager.ManagedSelector selectSet,
SelectionKey key,
Scheduler scheduler,
long idleTimeout,
List<NetworkTrafficListener> listeners) |
| Modifier and Type | Method and Description |
|---|---|
int |
fill(ByteBuffer buffer)
Fill the passed buffer with data from this endpoint.
|
boolean |
flush(ByteBuffer... buffers)
Flush data from the passed header/buffer to this endpoint.
|
void |
notifyIncoming(ByteBuffer buffer,
int read) |
void |
notifyOutgoing(ByteBuffer view) |
void |
onClose()
Callback method invoked when this
EndPoint is close. |
void |
onOpen()
Callback method invoked when this
EndPoint is opened. |
close, isOpen, needsFill, onIncompleteFlush, onSelected, toStringgetChannel, getSocket, getTransport, isInputShutdown, isOutputShutdown, shutdownInput, shutdownOutputfillInterested, getConnection, getCreatedTimeStamp, getFillInterest, getLocalAddress, getRemoteAddress, getWriteFlusher, onIdleExpired, setConnection, writecheckIdleTimeout, getIdleTimeout, getIdleTimestamp, notIdle, setIdleTimeoutclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfillInterested, getConnection, getCreatedTimeStamp, getIdleTimeout, getLocalAddress, getRemoteAddress, getTransport, isInputShutdown, isOutputShutdown, setConnection, setIdleTimeout, shutdownOutput, writepublic NetworkTrafficSelectChannelEndPoint(SocketChannel channel, SelectorManager.ManagedSelector selectSet, SelectionKey key, Scheduler scheduler, long idleTimeout, List<NetworkTrafficListener> listeners) throws IOException
IOExceptionpublic int fill(ByteBuffer buffer) throws IOException
EndPointfill in interface EndPointfill in class ChannelEndPointbuffer - 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.int value indicating the number of bytes
filled or -1 if EOF is read or the input is shutdown.EofException - If the endpoint is closed.IOExceptionpublic boolean flush(ByteBuffer... buffers) throws IOException
EndPointflush in interface EndPointflush in class ChannelEndPointEofException - If the endpoint is closed or output is shutdown.IOExceptionpublic void onOpen()
EndPointCallback method invoked when this EndPoint is opened.
onOpen in interface EndPointonOpen in class SelectChannelEndPointEndPoint.onClose()public void onClose()
EndPointCallback method invoked when this EndPoint is close.
onClose in interface EndPointonClose in class AbstractEndPointEndPoint.onOpen()public void notifyIncoming(ByteBuffer buffer, int read)
public void notifyOutgoing(ByteBuffer view)
Copyright © 1995-2015 Webtide. All Rights Reserved.