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
|
Method Summary |
void |
cancel(java.nio.channels.SelectionKey key)
if SelectionKey is valid, its canceled . |
void |
copyTo(Copyable copy)
|
void |
postProcess(java.nio.channels.SelectionKey key)
SelectionKey post process notification |
void |
process(java.nio.channels.SelectionKey key)
SelectionKey process notification |
| 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
-
- Specified by:
copyTo in interface Copyable- Overrides:
copyTo in class DefaultSelectionKeyHandler
process
public void process(java.nio.channels.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(java.nio.channels.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(java.nio.channels.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.