public final class DefaultSelectionKeyHandler extends Object implements SelectionKeyHandler
DEFAULT_SELECTION_KEY_HANDLER
Constructor and Description |
---|
DefaultSelectionKeyHandler() |
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) |
public void onKeyRegistered(SelectionKey key)
onKeyRegistered
in interface SelectionKeyHandler
public void onKeyDeregistered(SelectionKey key)
onKeyDeregistered
in interface SelectionKeyHandler
public void cancel(SelectionKey key) throws IOException
cancel
in interface SelectionKeyHandler
IOException
public int ioEvent2SelectionKeyInterest(IOEvent ioEvent)
ioEvent2SelectionKeyInterest
in interface SelectionKeyHandler
public IOEvent[] getIOEvents(int interest)
getIOEvents
in interface SelectionKeyHandler
public IOEvent selectionKeyInterest2IoEvent(int selectionKeyInterest)
selectionKeyInterest2IoEvent
in interface SelectionKeyHandler
public boolean onProcessInterest(SelectionKey key, int interest) throws IOException
onProcessInterest
in interface SelectionKeyHandler
IOException
public NIOConnection getConnectionForKey(SelectionKey selectionKey)
getConnectionForKey
in interface SelectionKeyHandler
public void setConnectionForKey(NIOConnection connection, SelectionKey selectionKey)
setConnectionForKey
in interface SelectionKeyHandler
Copyright © 2014 Oracle Corporation. All rights reserved.