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 |
notifyClosed() |
void |
notifyIncoming(ByteBuffer buffer,
int read) |
void |
notifyOpened() |
void |
notifyOutgoing(ByteBuffer buffer,
int position,
int written) |
close, isOpen, needsFill, onIncompleteFlush, onOpen, onSelected, toStringgetChannel, getSocket, getTransport, isInputShutdown, isOutputShutdown, shutdownInput, shutdownOutputfillInterested, getConnection, getCreatedTimeStamp, getFillInterest, getLocalAddress, getRemoteAddress, getWriteFlusher, onClose, onIdleExpired, setConnection, writecheckIdleTimeout, getIdleTimeout, getIdleTimestamp, notIdle, setIdleTimeoutclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfillInterested, getConnection, getCreatedTimeStamp, getIdleTimeout, getLocalAddress, getRemoteAddress, getTransport, isInputShutdown, isOutputShutdown, onClose, 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 notifyOpened()
public void notifyIncoming(ByteBuffer buffer, int read)
public void notifyOutgoing(ByteBuffer buffer, int position, int written)
public void notifyClosed()
Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.