java.io.Closeable, java.lang.AutoCloseable, EndPoint, ManagedSelector.Selectablepublic class NetworkTrafficSelectChannelEndPoint extends SelectChannelEndPoint
_currentInterestOps, _desiredInterestOps, _key, _selector| Constructor | Description |
|---|---|
NetworkTrafficSelectChannelEndPoint(java.nio.channels.SocketChannel channel,
ManagedSelector selectSet,
java.nio.channels.SelectionKey key,
Scheduler scheduler,
long idleTimeout,
java.util.List<NetworkTrafficListener> listeners) |
| Modifier and Type | Method | Description |
|---|---|---|
int |
fill(java.nio.ByteBuffer buffer) |
Fill the passed buffer with data from this endpoint.
|
boolean |
flush(java.nio.ByteBuffer... buffers) |
Flush data from the passed header/buffer to this endpoint.
|
void |
notifyIncoming(java.nio.ByteBuffer buffer,
int read) |
|
void |
notifyOutgoing(java.nio.ByteBuffer view) |
|
void |
onClose() |
Callback method invoked when this
EndPoint is close. |
void |
onOpen() |
Callback method invoked when this
EndPoint is opened. |
checkFill, checkFlush, close, close, doShutdownInput, fillInterested, getConnection, getCreatedTimeStamp, getFillInterest, getWriteFlusher, isFillInterested, isInputShutdown, isOutputShutdown, onClose, onIdleExpired, reset, setConnection, shutdownInput, shutdownOutput, toConnectionString, toString, tryFillInterested, upgrade, writedoClose, getChannel, getTransport, isOpen, isOptimizedForDirectBuffers, needsFillInterest, onIncompleteFlush, onSelected, toEndPointString, updateKeygetIdleTimeout, setIdleTimeoutcheckIdleTimeout, getIdleFor, getIdleTimeout, getIdleTimestamp, getScheduler, notIdle, setIdleTimeoutclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdoShutdownOutput, getLocalAddress, getRemoteAddress, getSocketpublic NetworkTrafficSelectChannelEndPoint(java.nio.channels.SocketChannel channel,
ManagedSelector selectSet,
java.nio.channels.SelectionKey key,
Scheduler scheduler,
long idleTimeout,
java.util.List<NetworkTrafficListener> listeners)
throws java.io.IOException
java.io.IOExceptionpublic int fill(java.nio.ByteBuffer buffer)
throws java.io.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.java.io.IOException - if the endpoint is closed.public boolean flush(java.nio.ByteBuffer... buffers)
throws java.io.IOException
EndPointflush in interface EndPointflush in class ChannelEndPointbuffers - the buffers to flushjava.io.IOException - If the endpoint is closed or output is shutdown.public void onOpen()
EndPointCallback method invoked when this EndPoint is opened.
onOpen in interface EndPointonOpen in class AbstractEndPointEndPoint.onClose()public void onClose()
EndPointCallback method invoked when this EndPoint is close.
onClose in interface EndPointonClose in class ChannelEndPointEndPoint.onOpen()public void notifyIncoming(java.nio.ByteBuffer buffer,
int read)
public void notifyOutgoing(java.nio.ByteBuffer view)
Copyright © 1995–2018 Webtide. All rights reserved.