Top Description Fields Methods
org.glassfish.grizzly.nio

public Interface SelectionKeyHandler

Known Direct Implementers
org.glassfish.grizzly.nio.DefaultSelectionKeyHandler
Imports
java.io.IOException, java.nio.channels.SelectionKey, org.glassfish.grizzly.IOEvent

SelectionKeyHandler implementations are responsible for handling SelectionKey life cycle events.
Author
Alexey Stashok

Field Summary

Modifier and TypeField and Description
public static final SelectionKeyHandler
DEFAULT_SELECTION_KEY_HANDLER

The default SelectionKeyHandler used by all created builder instances.

Method Summary

Modifier and TypeMethod and Description
public void
public NIOConnection
public IOEvent[]
getIOEvents(int interest)

public int
public void
public void
public boolean
onProcessInterest(SelectionKey key, int interest)

public IOEvent
selectionKeyInterest2IoEvent(int selectionKeyInterest)

public void

Field Detail

DEFAULT_SELECTION_KEY_HANDLERback to summary
public 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.

Method Detail

cancelback to summary
public void cancel(SelectionKey key) throws IOException
getConnectionForKeyback to summary
public NIOConnection getConnectionForKey(SelectionKey selectionKey)
getIOEventsback to summary
public IOEvent[] getIOEvents(int interest)
ioEvent2SelectionKeyInterestback to summary
public int ioEvent2SelectionKeyInterest(IOEvent ioEvent)
onKeyDeregisteredback to summary
public void onKeyDeregistered(SelectionKey key)
onKeyRegisteredback to summary
public void onKeyRegistered(SelectionKey key)
onProcessInterestback to summary
public boolean onProcessInterest(SelectionKey key, int interest) throws IOException
selectionKeyInterest2IoEventback to summary
public IOEvent selectionKeyInterest2IoEvent(int selectionKeyInterest)
setConnectionForKeyback to summary
public void setConnectionForKey(NIOConnection connection, SelectionKey selectionKey)