org.glassfish.grizzly.nio
Interface SelectionKeyHandler

All Known Implementing Classes:
DefaultSelectionKeyHandler

public interface SelectionKeyHandler

SelectionKeyHandler implementations are responsible for handling SelectionKey life cycle events.

Author:
Alexey Stashok

Field Summary
static SelectionKeyHandler DEFAULT_SELECTION_KEY_HANDLER
          The default SelectionKeyHandler used by all created builder instances.
 
Method Summary
 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)
           
 

Field Detail

DEFAULT_SELECTION_KEY_HANDLER

static final SelectionKeyHandler DEFAULT_SELECTION_KEY_HANDLER
The default SelectionKeyHandler used by all created builder instances.

Method Detail

onKeyRegistered

void onKeyRegistered(java.nio.channels.SelectionKey key)

onKeyDeregistered

void onKeyDeregistered(java.nio.channels.SelectionKey key)

onProcessInterest

boolean onProcessInterest(java.nio.channels.SelectionKey key,
                          int interest)
                          throws java.io.IOException
Throws:
java.io.IOException

cancel

void cancel(java.nio.channels.SelectionKey key)
            throws java.io.IOException
Throws:
java.io.IOException

getConnectionForKey

NIOConnection getConnectionForKey(java.nio.channels.SelectionKey selectionKey)

setConnectionForKey

void setConnectionForKey(NIOConnection connection,
                         java.nio.channels.SelectionKey selectionKey)

ioEvent2SelectionKeyInterest

int ioEvent2SelectionKeyInterest(IOEvent ioEvent)

selectionKeyInterest2IoEvent

IOEvent selectionKeyInterest2IoEvent(int selectionKeyInterest)

getIOEvents

IOEvent[] getIOEvents(int interest)


Copyright © 2012 Oracle Corporation. All Rights Reserved.