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, isInterruptable, isWritable, notIdle, onIdleExpired, schedule, scheduleTimeout, scheduleWrite, setCheckForIdle, setConnection, setInterruptable, setMaxIdleTime, toString, undispatchflush, getChannel, getLocalAddr, getLocalHost, getLocalPort, getMaxIdleTime, getRemoteAddr, getRemoteHost, getRemotePort, getTransport, isBlocking, isInputShutdown, isOpen, isOutputShutdown, shutdownChannelInput, shutdownChannelOutput, shutdownInput, shutdownOutputclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitflush, getLocalAddr, getLocalHost, getLocalPort, getMaxIdleTime, getRemoteAddr, getRemoteHost, getRemotePort, getTransport, isBlocking, isInputShutdown, isOpen, isOutputShutdown, shutdownInput, shutdownOutputpublic NetworkTrafficSelectChannelEndPoint(SocketChannel channel, SelectorManager.SelectSet selectSet, SelectionKey key, int maxIdleTime, List<NetworkTrafficListener> listeners) throws IOException
IOExceptionpublic int fill(Buffer buffer) throws IOException
EndPointfill in interface EndPointfill in class SelectChannelEndPointint value indicating the number of bytes
filled or -1 if EOF is reached.EofException - If input is shutdown or the endpoint is closed.IOExceptionpublic int flush(Buffer buffer) throws IOException
EndPointflush in interface EndPointflush in class SelectChannelEndPointbuffer - The buffer to flush. This buffers getIndex is updated.EofException - If the endpoint is closed or output is shutdown.IOExceptionprotected int gatheringFlush(Buffer header, ByteBuffer bbuf0, Buffer buffer, ByteBuffer bbuf1) throws IOException
gatheringFlush in class ChannelEndPointIOExceptionpublic void notifyOpened()
public void notifyIncoming(Buffer buffer, int read)
public void notifyOutgoing(Buffer buffer, int position, int written)
public void notifyClosed()
Copyright © 1995-2015 Mort Bay Consulting. All Rights Reserved.