public final class DefaultSelectionKeyHandler extends java.lang.Object implements SelectionKeyHandler
DEFAULT_SELECTION_KEY_HANDLER| Constructor and Description |
|---|
DefaultSelectionKeyHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
cancel(java.nio.channels.SelectionKey key) |
NIOConnection |
getConnectionForKey(java.nio.channels.SelectionKey selectionKey) |
IOEvent[] |
getIOEvents(int interest) |
int |
ioEvent2SelectionKeyInterest(IOEvent ioEvent) |
void |
onKeyDeregistered(java.nio.channels.SelectionKey key) |
void |
onKeyRegistered(java.nio.channels.SelectionKey key) |
boolean |
onProcessInterest(java.nio.channels.SelectionKey key,
int interest) |
IOEvent |
selectionKeyInterest2IoEvent(int selectionKeyInterest) |
void |
setConnectionForKey(NIOConnection connection,
java.nio.channels.SelectionKey selectionKey) |
public void onKeyRegistered(java.nio.channels.SelectionKey key)
onKeyRegistered in interface SelectionKeyHandlerpublic void onKeyDeregistered(java.nio.channels.SelectionKey key)
onKeyDeregistered in interface SelectionKeyHandlerpublic void cancel(java.nio.channels.SelectionKey key)
throws java.io.IOException
cancel in interface SelectionKeyHandlerjava.io.IOExceptionpublic int ioEvent2SelectionKeyInterest(IOEvent ioEvent)
ioEvent2SelectionKeyInterest in interface SelectionKeyHandlerpublic IOEvent[] getIOEvents(int interest)
getIOEvents in interface SelectionKeyHandlerpublic IOEvent selectionKeyInterest2IoEvent(int selectionKeyInterest)
selectionKeyInterest2IoEvent in interface SelectionKeyHandlerpublic boolean onProcessInterest(java.nio.channels.SelectionKey key,
int interest)
throws java.io.IOException
onProcessInterest in interface SelectionKeyHandlerjava.io.IOExceptionpublic NIOConnection getConnectionForKey(java.nio.channels.SelectionKey selectionKey)
getConnectionForKey in interface SelectionKeyHandlerpublic void setConnectionForKey(NIOConnection connection, java.nio.channels.SelectionKey selectionKey)
setConnectionForKey in interface SelectionKeyHandlerCopyright © 2018 Oracle Corporation. All Rights Reserved.