Package org.eclipse.jetty.io
Class ManagedSelector.Acceptor
- java.lang.Object
-
- org.eclipse.jetty.io.ManagedSelector.Acceptor
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,ManagedSelector.Selectable,ManagedSelector.SelectorUpdate
- Enclosing class:
- ManagedSelector
class ManagedSelector.Acceptor extends java.lang.Object implements ManagedSelector.SelectorUpdate, ManagedSelector.Selectable, java.io.Closeable
-
-
Constructor Summary
Constructors Constructor Description Acceptor(java.nio.channels.SelectableChannel channel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()java.lang.RunnableonSelected()Callback method invoked when a read or write events has been detected by theManagedSelectorfor this endpoint.voidreplaceKey(java.nio.channels.SelectionKey newKey)Callback method invoked when the SelectionKey is replaced because the channel has been moved to a new selector.voidupdate(java.nio.channels.Selector selector)voidupdateKey()Callback method invoked when all the keys selected by theManagedSelectorfor this endpoint have been processed.
-
-
-
Method Detail
-
update
public void update(java.nio.channels.Selector selector)
- Specified by:
updatein interfaceManagedSelector.SelectorUpdate
-
onSelected
public java.lang.Runnable onSelected()
Description copied from interface:ManagedSelector.SelectableCallback method invoked when a read or write events has been detected by theManagedSelectorfor this endpoint.- Specified by:
onSelectedin interfaceManagedSelector.Selectable- Returns:
- a job that may block or null
-
updateKey
public void updateKey()
Description copied from interface:ManagedSelector.SelectableCallback method invoked when all the keys selected by theManagedSelectorfor this endpoint have been processed.- Specified by:
updateKeyin interfaceManagedSelector.Selectable
-
replaceKey
public void replaceKey(java.nio.channels.SelectionKey newKey)
Description copied from interface:ManagedSelector.SelectableCallback method invoked when the SelectionKey is replaced because the channel has been moved to a new selector.- Specified by:
replaceKeyin interfaceManagedSelector.Selectable- Parameters:
newKey- the new SelectionKey
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-