public interface SelectionKeyHandler
SelectionKeyHandler
implementations are responsible for handling
SelectionKey
life cycle events.Modifier and Type | Field and Description |
---|---|
static SelectionKeyHandler |
DEFAULT_SELECTION_KEY_HANDLER
The default
SelectionKeyHandler used by all created builder instances. |
Modifier and Type | Method and Description |
---|---|
void |
cancel(SelectionKey key) |
NIOConnection |
getConnectionForKey(SelectionKey selectionKey) |
IOEvent[] |
getIOEvents(int interest) |
int |
ioEvent2SelectionKeyInterest(IOEvent ioEvent) |
void |
onKeyDeregistered(SelectionKey key) |
void |
onKeyRegistered(SelectionKey key) |
boolean |
onProcessInterest(SelectionKey key,
int interest) |
IOEvent |
selectionKeyInterest2IoEvent(int selectionKeyInterest) |
void |
setConnectionForKey(NIOConnection connection,
SelectionKey selectionKey) |
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.
void onKeyRegistered(SelectionKey key)
void onKeyDeregistered(SelectionKey key)
boolean onProcessInterest(SelectionKey key, int interest) throws IOException
IOException
void cancel(SelectionKey key) throws IOException
IOException
NIOConnection getConnectionForKey(SelectionKey selectionKey)
void setConnectionForKey(NIOConnection connection, SelectionKey selectionKey)
int ioEvent2SelectionKeyInterest(IOEvent ioEvent)
IOEvent selectionKeyInterest2IoEvent(int selectionKeyInterest)
IOEvent[] getIOEvents(int interest)
Copyright © 2015 Oracle Corporation. All rights reserved.