Package org.eclipse.jetty.io
Class SelectChannelEndPoint
- java.lang.Object
-
- org.eclipse.jetty.io.IdleTimeout
-
- org.eclipse.jetty.io.AbstractEndPoint
-
- org.eclipse.jetty.io.ChannelEndPoint
-
- org.eclipse.jetty.io.SelectChannelEndPoint
-
- All Implemented Interfaces:
Closeable,AutoCloseable,EndPoint,ManagedSelector.SelectableEndPoint
- Direct Known Subclasses:
NetworkTrafficSelectChannelEndPoint
public class SelectChannelEndPoint extends ChannelEndPoint implements ManagedSelector.SelectableEndPoint
An ChannelEndpoint that can be scheduled bySelectorManager.
-
-
Constructor Summary
Constructors Constructor Description SelectChannelEndPoint(SocketChannel channel, ManagedSelector selector, SelectionKey key, Scheduler scheduler, long idleTimeout)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close any backing stream associated with the endpointbooleanisOpen()This abstract method should be called to check if idle timeouts should still be checked.protected voidneedsFillInterest()protected voidonIncompleteFlush()voidonOpen()Callback method invoked when thisEndPointis opened.RunnableonSelected()Callback method invoked when a read or write events has been detected by theManagedSelectorfor this endpoint.StringtoString()voidupdateKey()Callback method invoked when all the keys selected by theManagedSelectorfor this endpoint have been processed.-
Methods inherited from class org.eclipse.jetty.io.ChannelEndPoint
fill, flush, getChannel, getSocket, getTransport, isInputShutdown, isOptimizedForDirectBuffers, isOutputShutdown, shutdownInput, shutdownOutput
-
Methods inherited from class org.eclipse.jetty.io.AbstractEndPoint
close, fillInterested, getConnection, getCreatedTimeStamp, getFillInterest, getLocalAddress, getRemoteAddress, getWriteFlusher, isFillInterested, onIdleExpired, setConnection, tryFillInterested, upgrade, write
-
Methods inherited from class org.eclipse.jetty.io.IdleTimeout
checkIdleTimeout, getIdleFor, getIdleTimeout, getIdleTimestamp, getScheduler, notIdle, onClose, setIdleTimeout
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.jetty.io.EndPoint
fill, fillInterested, flush, getConnection, getCreatedTimeStamp, getIdleTimeout, getLocalAddress, getRemoteAddress, getTransport, isFillInterested, isInputShutdown, isOptimizedForDirectBuffers, isOutputShutdown, onClose, setConnection, setIdleTimeout, shutdownOutput, tryFillInterested, upgrade, write
-
-
-
-
Field Detail
-
LOG
public static final Logger LOG
-
-
Constructor Detail
-
SelectChannelEndPoint
public SelectChannelEndPoint(SocketChannel channel, ManagedSelector selector, SelectionKey key, Scheduler scheduler, long idleTimeout)
-
-
Method Detail
-
needsFillInterest
protected void needsFillInterest()
- Overrides:
needsFillInterestin classChannelEndPoint
-
onIncompleteFlush
protected void onIncompleteFlush()
- Overrides:
onIncompleteFlushin classChannelEndPoint
-
onSelected
public Runnable onSelected()
Description copied from interface:ManagedSelector.SelectableEndPointCallback method invoked when a read or write events has been detected by theManagedSelectorfor this endpoint.- Specified by:
onSelectedin interfaceManagedSelector.SelectableEndPoint- Returns:
- a job that may block or null
-
updateKey
public void updateKey()
Description copied from interface:ManagedSelector.SelectableEndPointCallback method invoked when all the keys selected by theManagedSelectorfor this endpoint have been processed.- Specified by:
updateKeyin interfaceManagedSelector.SelectableEndPoint
-
close
public void close()
Description copied from interface:EndPointClose any backing stream associated with the endpoint- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceEndPoint- Overrides:
closein classChannelEndPoint
-
isOpen
public boolean isOpen()
Description copied from class:IdleTimeoutThis abstract method should be called to check if idle timeouts should still be checked.- Specified by:
isOpenin interfaceEndPoint- Overrides:
isOpenin classChannelEndPoint- Returns:
- True if the entity monitored should still be checked for idle timeouts
-
onOpen
public void onOpen()
Description copied from interface:EndPointCallback method invoked when this
EndPointis opened.- Specified by:
onOpenin interfaceEndPoint- Overrides:
onOpenin classAbstractEndPoint- See Also:
EndPoint.onClose()
-
toString
public String toString()
- Overrides:
toStringin classAbstractEndPoint
-
-