org.glassfish.grizzly.nio
Interface SelectionKeyHandler
- All Known Implementing Classes:
- DefaultSelectionKeyHandler
public interface SelectionKeyHandler
SelectionKeyHandler implementations are responsible for handling
SelectionKey life cycle events.
- Author:
- Alexey Stashok
DEFAULT_SELECTION_KEY_HANDLER
static final SelectionKeyHandler DEFAULT_SELECTION_KEY_HANDLER
The default SelectionKeyHandler used by all created builder instances.
The default may be changed by setting the system property org.glassfish.grizzly.DEFAULT_SELECTION_KEY_HANDLER
with 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.
onKeyRegistered
void onKeyRegistered(SelectionKey key)
onKeyDeregistered
void onKeyDeregistered(SelectionKey key)
onProcessInterest
boolean onProcessInterest(SelectionKey key,
int interest)
throws IOException
- Throws:
IOException
cancel
void cancel(SelectionKey key)
throws IOException
- Throws:
IOException
getConnectionForKey
NIOConnection getConnectionForKey(SelectionKey selectionKey)
setConnectionForKey
void setConnectionForKey(NIOConnection connection,
SelectionKey selectionKey)
ioEvent2SelectionKeyInterest
int ioEvent2SelectionKeyInterest(IOEvent ioEvent)
selectionKeyInterest2IoEvent
IOEvent selectionKeyInterest2IoEvent(int selectionKeyInterest)
getIOEvents
IOEvent[] getIOEvents(int interest)
Copyright © 2012 Oracle Corporation. All Rights Reserved.