public class SelectChannelEndPoint extends ChannelEndPoint implements SelectorManager.SelectableEndPoint
SelectorManager
.Constructor and Description |
---|
SelectChannelEndPoint(SocketChannel channel,
SelectorManager.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 boolean |
needsFill() |
protected void |
onIncompleteFlush() |
void |
onOpen()
Callback method invoked when this
EndPoint is opened. |
void |
onSelected()
Callback method invoked when a read or write events has been detected by the
SelectorManager.ManagedSelector
for this endpoint. |
String |
toString() |
fill, flush, getChannel, getSocket, getTransport, isInputShutdown, isOutputShutdown, shutdownInput, shutdownOutput
fillInterested, getConnection, getCreatedTimeStamp, getFillInterest, getLocalAddress, getRemoteAddress, getWriteFlusher, onClose, onIdleExpired, setConnection, write
checkIdleTimeout, getIdleTimeout, getIdleTimestamp, notIdle, setIdleTimeout
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
fill, fillInterested, flush, getConnection, getCreatedTimeStamp, getIdleTimeout, getLocalAddress, getRemoteAddress, getTransport, isInputShutdown, isOutputShutdown, onClose, setConnection, setIdleTimeout, shutdownOutput, write
public static final Logger LOG
public SelectChannelEndPoint(SocketChannel channel, SelectorManager.ManagedSelector selector, SelectionKey key, Scheduler scheduler, long idleTimeout)
protected boolean needsFill()
needsFill
in class ChannelEndPoint
protected void onIncompleteFlush()
onIncompleteFlush
in class ChannelEndPoint
public void onSelected()
SelectorManager.SelectableEndPoint
Callback method invoked when a read or write events has been detected by the SelectorManager.ManagedSelector
for this endpoint.
onSelected
in interface SelectorManager.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-2015 Webtide. All Rights Reserved.