public class SelectChannelEndPoint extends ChannelEndPoint implements ManagedSelector.SelectableEndPoint
SelectorManager
.Constructor and Description |
---|
SelectChannelEndPoint(SocketChannel channel,
ManagedSelector selector,
SelectionKey key,
Scheduler scheduler,
long idleTimeout) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close any backing stream associated with the endpoint
|
boolean |
isOpen()
This abstract method should be called to check if idle timeouts
should still be checked.
|
protected void |
needsFillInterest() |
protected void |
onIncompleteFlush() |
void |
onOpen()
Callback method invoked when this
EndPoint is opened. |
Runnable |
onSelected()
Callback method invoked when a read or write events has been
detected by the
ManagedSelector for this endpoint. |
String |
toString() |
void |
updateKey()
Callback method invoked when all the keys selected by the
ManagedSelector for this endpoint have been processed. |
fill, flush, getChannel, getSocket, getTransport, isInputShutdown, isOptimizedForDirectBuffers, isOutputShutdown, shutdownInput, shutdownOutput
fillInterested, getConnection, getCreatedTimeStamp, getFillInterest, getLocalAddress, getRemoteAddress, getWriteFlusher, isFillInterested, onClose, onIdleExpired, setConnection, upgrade, write
checkIdleTimeout, getIdleFor, getIdleTimeout, getIdleTimestamp, getScheduler, notIdle, setIdleTimeout
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
fill, fillInterested, flush, getConnection, getCreatedTimeStamp, getIdleTimeout, getLocalAddress, getRemoteAddress, getTransport, isFillInterested, isInputShutdown, isOptimizedForDirectBuffers, isOutputShutdown, onClose, setConnection, setIdleTimeout, shutdownOutput, upgrade, write
public static final Logger LOG
public SelectChannelEndPoint(SocketChannel channel, ManagedSelector selector, SelectionKey key, Scheduler scheduler, long idleTimeout)
protected void needsFillInterest()
needsFillInterest
in class ChannelEndPoint
protected void onIncompleteFlush()
onIncompleteFlush
in class ChannelEndPoint
public Runnable onSelected()
ManagedSelector.SelectableEndPoint
ManagedSelector
for this endpoint.onSelected
in interface ManagedSelector.SelectableEndPoint
public void updateKey()
ManagedSelector.SelectableEndPoint
ManagedSelector
for this endpoint have been processed.updateKey
in interface ManagedSelector.SelectableEndPoint
public void close()
EndPoint
close
in interface Closeable
close
in interface AutoCloseable
close
in interface EndPoint
close
in class ChannelEndPoint
public boolean isOpen()
IdleTimeout
isOpen
in interface EndPoint
isOpen
in class ChannelEndPoint
public void onOpen()
EndPoint
Callback method invoked when this EndPoint
is opened.
onOpen
in interface EndPoint
onOpen
in class AbstractEndPoint
EndPoint.onClose()
public String toString()
toString
in class AbstractEndPoint
Copyright © 1995-2016 Webtide. All Rights Reserved.