public class NetworkTrafficSelectChannelEndPoint extends SelectChannelEndPoint
_currentInterestOps, _desiredInterestOps, _key, _selector| 构造器和说明 |
|---|
NetworkTrafficSelectChannelEndPoint(SocketChannel channel,
ManagedSelector selectSet,
SelectionKey key,
org.eclipse.jetty.util.thread.Scheduler scheduler,
long idleTimeout,
List<NetworkTrafficListener> listeners) |
| 限定符和类型 | 方法和说明 |
|---|---|
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. |
doShutdownOutput, getLocalAddress, getRemoteAddress, getSocketdoClose, getChannel, getTransport, isOpen, isOptimizedForDirectBuffers, needsFillInterest, onIncompleteFlush, onSelected, toEndPointString, updateKeycheckFill, checkFlush, close, close, doShutdownInput, fillInterested, getConnection, getCreatedTimeStamp, getFillInterest, getWriteFlusher, isFillInterested, isInputShutdown, isOutputShutdown, onClose, onIdleExpired, reset, setConnection, shutdownInput, shutdownOutput, toConnectionString, toString, tryFillInterested, upgrade, writecheckIdleTimeout, getIdleFor, getIdleTimeout, getIdleTimestamp, getScheduler, notIdle, setIdleTimeoutclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetIdleTimeout, setIdleTimeoutpublic NetworkTrafficSelectChannelEndPoint(SocketChannel channel, ManagedSelector selectSet, SelectionKey key, org.eclipse.jetty.util.thread.Scheduler scheduler, long idleTimeout, List<NetworkTrafficListener> listeners) throws IOException
IOExceptionpublic int fill(ByteBuffer buffer) throws IOException
EndPointfill 在接口中 EndPointfill 在类中 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.IOException - if the endpoint is closed.public boolean flush(ByteBuffer... buffers) throws IOException
EndPointflush 在接口中 EndPointflush 在类中 ChannelEndPointbuffers - the buffers to flushIOException - If the endpoint is closed or output is shutdown.public void onOpen()
EndPointCallback method invoked when this EndPoint is opened.
onOpen 在接口中 EndPointonOpen 在类中 AbstractEndPointEndPoint.onClose()public void onClose()
EndPointCallback method invoked when this EndPoint is close.
onClose 在接口中 EndPointonClose 在类中 ChannelEndPointEndPoint.onOpen()public void notifyIncoming(ByteBuffer buffer, int read)
public void notifyOutgoing(ByteBuffer view)
Copyright © 2017. All rights reserved.