|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.grizzly.BaseSelectionKeyHandler
com.sun.grizzly.DefaultSelectionKeyHandler
com.sun.grizzly.http.SelectorThreadKeyHandler
public class SelectorThreadKeyHandler
Default HTTP SelectionKeyHandler implementation
| Field Summary | |
|---|---|
protected ConcurrentLinkedQueue<SelectionKey> |
bannedKeys
Banned SelectionKey registration. |
| Fields inherited from class com.sun.grizzly.DefaultSelectionKeyHandler |
|---|
nextKeysExpiration, timeout |
| Fields inherited from class com.sun.grizzly.BaseSelectionKeyHandler |
|---|
logger, selectorHandler |
| Constructor Summary | |
|---|---|
SelectorThreadKeyHandler()
|
|
SelectorThreadKeyHandler(SelectorThread selectorThread)
|
|
| Method Summary | |
|---|---|
void |
addBannedSelectionKey(SelectionKey key)
Add a SelectionKey to the banned list of SelectionKeys. |
void |
cancel(SelectionKey key)
Cancel a SelectionKey and close its associated Channel. |
void |
copyTo(Copyable copy)
Copies current object content to copy object |
void |
doRegisterKey(SelectionKey key,
int ops,
long currentTime)
Registers SelectionKey to handle certain operations |
void |
expire(Iterator<SelectionKey> keys)
Expire a SelectionKey set. Method checks
each SelectionKey from the Set. And if
a SelectionKey is inactive for certain time (timeout),
the SelectionKey will be cancelled and its associated Channel closed. |
| Methods inherited from class com.sun.grizzly.DefaultSelectionKeyHandler |
|---|
clearKeyAttachment, expire, getTimeout, postProcess, process, 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 |
| Field Detail |
|---|
protected ConcurrentLinkedQueue<SelectionKey> bannedKeys
| Constructor Detail |
|---|
public SelectorThreadKeyHandler()
public SelectorThreadKeyHandler(SelectorThread selectorThread)
| Method Detail |
|---|
public void copyTo(Copyable copy)
DefaultSelectionKeyHandler
copyTo in interface CopyablecopyTo in class DefaultSelectionKeyHandlercopy - represents target object, where current object's content will be copied
public void doRegisterKey(SelectionKey key,
int ops,
long currentTime)
DefaultSelectionKeyHandlerSelectionKey to handle certain operations
doRegisterKey in class DefaultSelectionKeyHandlerpublic void expire(Iterator<SelectionKey> keys)
DefaultSelectionKeyHandlerSelectionKey set. Method checks
each SelectionKey from the Set. And if
a SelectionKey is inactive for certain time (timeout),
the SelectionKey will be cancelled and its associated Channel closed.
expire in interface SelectionKeyHandlerexpire in class DefaultSelectionKeyHandlerkeys - Iterator of SelectionKeys
to expirepublic void cancel(SelectionKey key)
BaseSelectionKeyHandler
cancel in interface SelectionKeyHandlercancel in class BaseSelectionKeyHandlerkey - SelectionKey to cancelpublic void addBannedSelectionKey(SelectionKey key)
SelectionKey to the banned list of SelectionKeys.
A SelectionKey is banned when new registration aren't allowed on the
Selector.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||