- All Known Implementing Classes:
DefaultSelectionKeyHandler
public interface SelectionKeyHandler
SelectionKeyHandler implementations are responsible for handling SelectionKey life cycle events.- Author:
- Alexey Stashok
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SelectionKeyHandlerThe defaultSelectionKeyHandlerused by all created builder instances. -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel(SelectionKey key) getConnectionForKey(SelectionKey selectionKey) IOEvent[]getIOEvents(int interest) intioEvent2SelectionKeyInterest(IOEvent ioEvent) voidvoidbooleanonProcessInterest(SelectionKey key, int interest) selectionKeyInterest2IoEvent(int selectionKeyInterest) voidsetConnectionForKey(NIOConnection connection, SelectionKey selectionKey)
-
Field Details
-
DEFAULT_SELECTION_KEY_HANDLER
The default
SelectionKeyHandlerused by all created builder instances.The default may be changed by setting the system property
org.glassfish.grizzly.DEFAULT_SELECTION_KEY_HANDLERwith the fully qualified name of the class that implements the SelectionKeyHandler interface. Note that this class must be public and have a public no-arg constructor.
-
-
Method Details
-
onKeyRegistered
-
onKeyDeregistered
-
onProcessInterest
- Throws:
IOException
-
cancel
- Throws:
IOException
-
getConnectionForKey
-
setConnectionForKey
-
ioEvent2SelectionKeyInterest
-
selectionKeyInterest2IoEvent
-
getIOEvents
-