public class NetworkTrafficSelectChannelEndPoint extends SelectChannelEndPoint
_channel, _gather2, _local, _maxIdleTime, _remote, _socket
Constructor and Description |
---|
NetworkTrafficSelectChannelEndPoint(SocketChannel channel,
SelectorManager.SelectSet selectSet,
SelectionKey key,
int maxIdleTime,
List<NetworkTrafficListener> listeners) |
Modifier and Type | Method and Description |
---|---|
int |
fill(Buffer buffer)
Fill the buffer from the current putIndex to it's capacity from whatever
byte source is backing the buffer.
|
int |
flush(Buffer buffer)
Flush the buffer from the current getIndex to it's putIndex using whatever byte
sink is backing the buffer.
|
protected int |
gatheringFlush(Buffer header,
ByteBuffer bbuf0,
Buffer buffer,
ByteBuffer bbuf1) |
void |
notifyClosed() |
void |
notifyIncoming(Buffer buffer,
int read) |
void |
notifyOpened() |
void |
notifyOutgoing(Buffer buffer,
int position,
int written) |
asyncDispatch, blockReadable, blockWritable, cancelTimeout, checkIdleTimestamp, close, dispatch, flush, getConnection, getIdleTimestamp, getSelectionKey, getSelectManager, getSelectSet, handle, hasProgressed, isCheckForIdle, isWritable, notIdle, onIdleExpired, schedule, scheduleTimeout, scheduleWrite, setCheckForIdle, setConnection, setMaxIdleTime, toString, undispatch
flush, getChannel, getLocalAddr, getLocalHost, getLocalPort, getMaxIdleTime, getRemoteAddr, getRemoteHost, getRemotePort, getTransport, isBlocking, isInputShutdown, isOpen, isOutputShutdown, shutdownChannelInput, shutdownChannelOutput, shutdownInput, shutdownOutput
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
flush, getLocalAddr, getLocalHost, getLocalPort, getMaxIdleTime, getRemoteAddr, getRemoteHost, getRemotePort, getTransport, isBlocking, isInputShutdown, isOpen, isOutputShutdown, shutdownInput, shutdownOutput
public NetworkTrafficSelectChannelEndPoint(SocketChannel channel, SelectorManager.SelectSet selectSet, SelectionKey key, int maxIdleTime, List<NetworkTrafficListener> listeners) throws IOException
IOException
public int fill(Buffer buffer) throws IOException
EndPoint
fill
in interface EndPoint
fill
in class SelectChannelEndPoint
int
value indicating the number of bytes
filled or -1 if EOF is reached.EofException
- If input is shutdown or the endpoint is closed.IOException
public int flush(Buffer buffer) throws IOException
EndPoint
flush
in interface EndPoint
flush
in class SelectChannelEndPoint
buffer
- The buffer to flush. This buffers getIndex is updated.EofException
- If the endpoint is closed or output is shutdown.IOException
protected int gatheringFlush(Buffer header, ByteBuffer bbuf0, Buffer buffer, ByteBuffer bbuf1) throws IOException
gatheringFlush
in class ChannelEndPoint
IOException
public void notifyOpened()
public void notifyIncoming(Buffer buffer, int read)
public void notifyOutgoing(Buffer buffer, int position, int written)
public void notifyClosed()
Copyright © 1995-2013 Mort Bay Consulting. All Rights Reserved.