com.sun.grizzly.nio
Class DefaultSelectionKeyHandler

java.lang.Object
  extended by com.sun.grizzly.nio.DefaultSelectionKeyHandler
All Implemented Interfaces:
SelectionKeyHandler

public class DefaultSelectionKeyHandler
extends Object
implements SelectionKeyHandler

Author:
oleksiys

Constructor Summary
DefaultSelectionKeyHandler()
           
 
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSelectionKeyHandler

public DefaultSelectionKeyHandler()
Method Detail

onKeyRegistered

public void onKeyRegistered(SelectionKey key)
Specified by:
onKeyRegistered in interface SelectionKeyHandler

cancel

public void cancel(SelectionKey key)
            throws IOException
Specified by:
cancel in interface SelectionKeyHandler
Throws:
IOException

ioEvent2SelectionKeyInterest

public int ioEvent2SelectionKeyInterest(IOEvent ioEvent)
Specified by:
ioEvent2SelectionKeyInterest in interface SelectionKeyHandler

selectionKeyInterest2IoEvent

public IOEvent selectionKeyInterest2IoEvent(int selectionKeyInterest)
Specified by:
selectionKeyInterest2IoEvent in interface SelectionKeyHandler

onAcceptInterest

public boolean onAcceptInterest(SelectionKey key)
                         throws IOException
Specified by:
onAcceptInterest in interface SelectionKeyHandler
Throws:
IOException

onConnectInterest

public boolean onConnectInterest(SelectionKey key)
                          throws IOException
Specified by:
onConnectInterest in interface SelectionKeyHandler
Throws:
IOException

onReadInterest

public boolean onReadInterest(SelectionKey key)
                       throws IOException
Specified by:
onReadInterest in interface SelectionKeyHandler
Throws:
IOException

onWriteInterest

public boolean onWriteInterest(SelectionKey key)
                        throws IOException
Specified by:
onWriteInterest in interface SelectionKeyHandler
Throws:
IOException

getConnectionForKey

public NIOConnection getConnectionForKey(SelectionKey selectionKey)
Specified by:
getConnectionForKey in interface SelectionKeyHandler

setConnectionForKey

public void setConnectionForKey(NIOConnection connection,
                                SelectionKey selectionKey)
Specified by:
setConnectionForKey in interface SelectionKeyHandler


Copyright © 2009 SUN Microsystems. All Rights Reserved.