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

Method Summary
 void cancel(SelectionKey key)
           
 NIOConnection getConnectionForKey(SelectionKey selectionKey)
           
 int ioEvent2SelectionKeyInterest(IOEvent ioEvent)
           
 boolean onAcceptInterest(SelectionKey key)
           
 boolean onConnectInterest(SelectionKey key)
           
 void onKeyRegistered(SelectionKey key)
           
 boolean onReadInterest(SelectionKey key)
           
 boolean onWriteInterest(SelectionKey key)
           
 IOEvent selectionKeyInterest2IoEvent(int selectionKeyInterest)
           
 void setConnectionForKey(NIOConnection connection, SelectionKey selectionKey)
           
 

Method Detail

onKeyRegistered

void onKeyRegistered(SelectionKey key)

onAcceptInterest

boolean onAcceptInterest(SelectionKey key)
                         throws IOException
Throws:
IOException

onConnectInterest

boolean onConnectInterest(SelectionKey key)
                          throws IOException
Throws:
IOException

onReadInterest

boolean onReadInterest(SelectionKey key)
                       throws IOException
Throws:
IOException

onWriteInterest

boolean onWriteInterest(SelectionKey key)
                        throws IOException
Throws:
IOException

cancel

void cancel(SelectionKey key)
            throws IOException
Throws:
IOException

getConnectionForKey

NIOConnection getConnectionForKey(SelectionKey selectionKey)

setConnectionForKey

void setConnectionForKey(NIOConnection connection,
                         SelectionKey selectionKey)

ioEvent2SelectionKeyInterest

int ioEvent2SelectionKeyInterest(IOEvent ioEvent)

selectionKeyInterest2IoEvent

IOEvent selectionKeyInterest2IoEvent(int selectionKeyInterest)


Copyright © 2009 SUN Microsystems. All Rights Reserved.