com.sun.grizzly.http
Class SelectorThreadKeyHandler
java.lang.Object
com.sun.grizzly.BaseSelectionKeyHandler
com.sun.grizzly.DefaultSelectionKeyHandler
com.sun.grizzly.http.SelectorThreadKeyHandler
- All Implemented Interfaces:
- Handler, SelectionKeyHandler, ConnectionCloseHandlerNotifier, Copyable
public class SelectorThreadKeyHandler
- extends DefaultSelectionKeyHandler
Default HTTP SelectionKeyHandler
implementation
- Author:
- Jean-Francois Arcand, Alexey Stashok
Methods inherited from class com.sun.grizzly.DefaultSelectionKeyHandler |
addExpirationStamp, addExpirationStamp, expire, getExpirationStamp, getTimeout, postProcess, process, 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 |
SelectorThreadKeyHandler
public SelectorThreadKeyHandler()
SelectorThreadKeyHandler
public SelectorThreadKeyHandler(SelectorThread selectorThread)
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
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
doRegisterKey
public void doRegisterKey(SelectionKey key,
int ops,
long currentTime)
- Description copied from class:
DefaultSelectionKeyHandler
- Registers
SelectionKey
to handle certain operations
- Overrides:
doRegisterKey
in class DefaultSelectionKeyHandler
expire
public void expire(Iterator<SelectionKey> iterator)
- Expire a
SelectionKey
set. Method checks
each SelectionKey
from theSet
. And if
a SelectionKey
is inactive for certain time (timeout),
the SelectionKey
will be cancelled and its associated Channel closed.
- Specified by:
expire
in interface SelectionKeyHandler
- Overrides:
expire
in class DefaultSelectionKeyHandler
- Parameters:
iterator
- Iterator
of SelectionKey
s
to expire
Copyright © 2012 Oracle Corporation. All Rights Reserved.