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() |
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. |
void |
setIdleTimeout(long idleTimeout)
Set the idle timeout.
|
String |
toString() |
fill, flush, getChannel, getSocket, getTransport, isInputShutdown, isOutputShutdown, shutdownInput, shutdownOutput
checkIdleTimeout, fillInterested, getConnection, getCreatedTimeStamp, getFillInterest, getIdleTimeout, getIdleTimestamp, getLocalAddress, getRemoteAddress, getWriteFlusher, notIdle, onClose, scheduleIdleTimeout, setConnection, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
fill, fillInterested, flush, getConnection, getCreatedTimeStamp, getIdleTimeout, getLocalAddress, getRemoteAddress, getTransport, isInputShutdown, isOutputShutdown, onClose, setConnection, shutdownOutput, write
public static final Logger LOG
public SelectChannelEndPoint(SocketChannel channel, SelectorManager.ManagedSelector selector, SelectionKey key, Scheduler scheduler, long idleTimeout)
public void setIdleTimeout(long idleTimeout)
EndPoint
setIdleTimeout
in interface EndPoint
setIdleTimeout
in class AbstractEndPoint
idleTimeout
- the idle timeout in MS. Timeout <= 0 implies an infinite timeoutprotected 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()
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-2012 Mort Bay Consulting. All Rights Reserved.