com.sun.grizzly.connectioncache.server
Class CacheableSelectionKeyHandler
java.lang.Object
com.sun.grizzly.BaseSelectionKeyHandler
com.sun.grizzly.DefaultSelectionKeyHandler
com.sun.grizzly.connectioncache.server.CacheableSelectionKeyHandler
- All Implemented Interfaces:
- Handler, SelectionKeyHandler, ConnectionCloseHandlerNotifier, Copyable
public class CacheableSelectionKeyHandler
- extends DefaultSelectionKeyHandler
Extended implementation of the DefaultSelectionKeyHandler with
ConnectionManagement integrated in it
- Author:
- Alexey Stashok
Methods inherited from class com.sun.grizzly.DefaultSelectionKeyHandler |
addExpirationStamp, addExpirationStamp, doRegisterKey, expire, expire, getExpirationStamp, getTimeout, register, register, register, register, setTimeout |
Methods inherited from class com.sun.grizzly.BaseSelectionKeyHandler |
close, doAfterKeyCancel, doRegisterKey, getLogger, getSelectorHandler, notifyLocallyClose, notifyRemotlyClose, register, removeConnectionCloseHandler, setConnectionCloseHandler, setLogger, setSelectorHandler |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CacheableSelectionKeyHandler
public CacheableSelectionKeyHandler()
CacheableSelectionKeyHandler
public CacheableSelectionKeyHandler(int highWaterMark,
int numberToReclaim)
- Construct ConnectionManagementSelectionKeyHandler
- Parameters:
highWaterMark
- max number of simultaneously open connectionsnumberToReclaim
- number of connections to reclaim
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
- if SelectionKey is valid, its canceled .
BaseSelectionKeyHandler.doAfterKeyCancel(SelectionKey)
is called even if key is invalid.
- Specified by:
cancel
in interface SelectionKeyHandler
- Overrides:
cancel
in class BaseSelectionKeyHandler
- Parameters:
key
- SelectionKey
to cancel
Copyright © 2012 Oracle Corporation. All Rights Reserved.