com.sun.grizzly.connectioncache.server
Class CacheableSelectionKeyHandler

java.lang.Object
  extended by com.sun.grizzly.BaseSelectionKeyHandler
      extended by com.sun.grizzly.DefaultSelectionKeyHandler
          extended by com.sun.grizzly.connectioncache.server.CacheableSelectionKeyHandler
All Implemented Interfaces:
Handler, SelectionKeyHandler, Copyable

public class CacheableSelectionKeyHandler
extends DefaultSelectionKeyHandler

Extended implementation of the DefaultSelectionKeyHandler with ConnectionManagement integrated in it

Author:
Alexey Stashok

Field Summary
 
Fields inherited from class com.sun.grizzly.DefaultSelectionKeyHandler
nextKeysExpiration, timeout
 
Fields inherited from class com.sun.grizzly.BaseSelectionKeyHandler
logger, selectorHandler
 
Constructor Summary
CacheableSelectionKeyHandler()
           
CacheableSelectionKeyHandler(int highWaterMark, int numberToReclaim)
          Construct ConnectionManagementSelectionKeyHandler
 
Method Summary
 void cancel(SelectionKey key)
          Cancel a SelectionKey and close its associated Channel.
 void copyTo(Copyable copy)
          Copies current object content to copy object
 void postProcess(SelectionKey key)
          SelectionKey post process notification
 void process(SelectionKey key)
          SelectionKey process notification
 
Methods inherited from class com.sun.grizzly.DefaultSelectionKeyHandler
clearKeyAttachment, doRegisterKey, expire, expire, getTimeout, register, register, register, register, setTimeout
 
Methods inherited from class com.sun.grizzly.BaseSelectionKeyHandler
cancelKey, close, closeChannel, closeChannel, doRegisterKey, getLogger, getSelectorHandler, keyIsValid, setLogger, setSelectorHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheableSelectionKeyHandler

public CacheableSelectionKeyHandler()

CacheableSelectionKeyHandler

public CacheableSelectionKeyHandler(int highWaterMark,
                                    int numberToReclaim)
Construct ConnectionManagementSelectionKeyHandler

Parameters:
highWaterMark - max number of simultaneously open connections
numberToReclaim - number of connections to reclaim
Method Detail

copyTo

public void copyTo(Copyable copy)
Description copied from class: DefaultSelectionKeyHandler
Copies current object content to copy object

Specified by:
copyTo in interface Copyable
Overrides:
copyTo in class DefaultSelectionKeyHandler
Parameters:
copy - represents target object, where current object's content will be copied

process

public void process(SelectionKey key)
Description copied from class: DefaultSelectionKeyHandler
SelectionKey process notification

Specified by:
process in interface SelectionKeyHandler
Overrides:
process in class DefaultSelectionKeyHandler
Parameters:
key - SelectionKey to process

postProcess

public void postProcess(SelectionKey key)
Description copied from class: DefaultSelectionKeyHandler
SelectionKey post process notification

Specified by:
postProcess in interface SelectionKeyHandler
Overrides:
postProcess in class DefaultSelectionKeyHandler
Parameters:
key - SelectionKey to process

cancel

public void cancel(SelectionKey key)
Description copied from class: BaseSelectionKeyHandler
Cancel a SelectionKey and close its associated Channel.

Specified by:
cancel in interface SelectionKeyHandler
Overrides:
cancel in class BaseSelectionKeyHandler
Parameters:
key - SelectionKey to cancel


Copyright © 2008 SUN Microsystems. All Rights Reserved.