Package org.glassfish.grizzly.nio
Class DefaultSelectionKeyHandler
- java.lang.Object
-
- org.glassfish.grizzly.nio.DefaultSelectionKeyHandler
-
- All Implemented Interfaces:
SelectionKeyHandler
public final class DefaultSelectionKeyHandler extends Object implements SelectionKeyHandler
- Author:
- oleksiys
-
-
Field Summary
-
Fields inherited from interface org.glassfish.grizzly.nio.SelectionKeyHandler
DEFAULT_SELECTION_KEY_HANDLER
-
-
Constructor Summary
Constructors Constructor Description DefaultSelectionKeyHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel(SelectionKey key)NIOConnectiongetConnectionForKey(SelectionKey selectionKey)IOEvent[]getIOEvents(int interest)intioEvent2SelectionKeyInterest(IOEvent ioEvent)voidonKeyDeregistered(SelectionKey key)voidonKeyRegistered(SelectionKey key)booleanonProcessInterest(SelectionKey key, int interest)IOEventselectionKeyInterest2IoEvent(int selectionKeyInterest)voidsetConnectionForKey(NIOConnection connection, SelectionKey selectionKey)
-
-
-
Method Detail
-
onKeyRegistered
public void onKeyRegistered(SelectionKey key)
- Specified by:
onKeyRegisteredin interfaceSelectionKeyHandler
-
onKeyDeregistered
public void onKeyDeregistered(SelectionKey key)
- Specified by:
onKeyDeregisteredin interfaceSelectionKeyHandler
-
cancel
public void cancel(SelectionKey key) throws IOException
- Specified by:
cancelin interfaceSelectionKeyHandler- Throws:
IOException
-
ioEvent2SelectionKeyInterest
public int ioEvent2SelectionKeyInterest(IOEvent ioEvent)
- Specified by:
ioEvent2SelectionKeyInterestin interfaceSelectionKeyHandler
-
getIOEvents
public IOEvent[] getIOEvents(int interest)
- Specified by:
getIOEventsin interfaceSelectionKeyHandler
-
selectionKeyInterest2IoEvent
public IOEvent selectionKeyInterest2IoEvent(int selectionKeyInterest)
- Specified by:
selectionKeyInterest2IoEventin interfaceSelectionKeyHandler
-
onProcessInterest
public boolean onProcessInterest(SelectionKey key, int interest) throws IOException
- Specified by:
onProcessInterestin interfaceSelectionKeyHandler- Throws:
IOException
-
getConnectionForKey
public NIOConnection getConnectionForKey(SelectionKey selectionKey)
- Specified by:
getConnectionForKeyin interfaceSelectionKeyHandler
-
setConnectionForKey
public void setConnectionForKey(NIOConnection connection, SelectionKey selectionKey)
- Specified by:
setConnectionForKeyin interfaceSelectionKeyHandler
-
-