Package org.glassfish.grizzly.nio
Class DefaultSelectionKeyHandler
- java.lang.Object
-
- org.glassfish.grizzly.nio.DefaultSelectionKeyHandler
-
- All Implemented Interfaces:
SelectionKeyHandler
public final class DefaultSelectionKeyHandler extends java.lang.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(java.nio.channels.SelectionKey key)NIOConnectiongetConnectionForKey(java.nio.channels.SelectionKey selectionKey)IOEvent[]getIOEvents(int interest)intioEvent2SelectionKeyInterest(IOEvent ioEvent)voidonKeyDeregistered(java.nio.channels.SelectionKey key)voidonKeyRegistered(java.nio.channels.SelectionKey key)booleanonProcessInterest(java.nio.channels.SelectionKey key, int interest)IOEventselectionKeyInterest2IoEvent(int selectionKeyInterest)voidsetConnectionForKey(NIOConnection connection, java.nio.channels.SelectionKey selectionKey)
-
-
-
Method Detail
-
onKeyRegistered
public void onKeyRegistered(java.nio.channels.SelectionKey key)
- Specified by:
onKeyRegisteredin interfaceSelectionKeyHandler
-
onKeyDeregistered
public void onKeyDeregistered(java.nio.channels.SelectionKey key)
- Specified by:
onKeyDeregisteredin interfaceSelectionKeyHandler
-
cancel
public void cancel(java.nio.channels.SelectionKey key) throws java.io.IOException- Specified by:
cancelin interfaceSelectionKeyHandler- Throws:
java.io.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(java.nio.channels.SelectionKey key, int interest) throws java.io.IOException- Specified by:
onProcessInterestin interfaceSelectionKeyHandler- Throws:
java.io.IOException
-
getConnectionForKey
public NIOConnection getConnectionForKey(java.nio.channels.SelectionKey selectionKey)
- Specified by:
getConnectionForKeyin interfaceSelectionKeyHandler
-
setConnectionForKey
public void setConnectionForKey(NIOConnection connection, java.nio.channels.SelectionKey selectionKey)
- Specified by:
setConnectionForKeyin interfaceSelectionKeyHandler
-
-