|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.enterprise.web.connector.grizzly.comet.CometSelector
public class CometSelector
NIO Selector allowing CometHandler to receive
non-blocking requests bytes during request polling.
| Field Summary | |
|---|---|
protected CometEngine |
cometEngine
The CometEngine singleton |
| Constructor Summary | |
|---|---|
CometSelector(CometEngine cometEngine)
New CometSelector |
|
| Method Summary | |
|---|---|
protected void |
cancelCometTask(CometTask cometTask)
|
protected void |
cancelKey(SelectionKey key)
Cancel a SelectionKey, and delegate the request
polling interruption to the CometEngine |
SelectionKey |
cometKeyFor(SelectableChannel channel)
Return the SelectionKey associated with this channel. |
protected void |
expireIdleKeys()
Expires registered SelectionKey. |
int |
getSpinRate()
|
void |
registerKey(SelectionKey key,
CometTask cometTask)
Register the SelectionKey to the Selector. |
void |
resetSpinCounter()
|
void |
start()
Start the Selector running on its
Thread. |
void |
wakeup()
Wakes up the Selector |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected CometEngine cometEngine
CometEngine singleton
| Constructor Detail |
|---|
public CometSelector(CometEngine cometEngine)
CometSelector
cometEngine - The CometEngine singleton| Method Detail |
|---|
public void start()
throws InterruptedException
Selector running on its
Thread.
InterruptedExceptionprotected void expireIdleKeys()
SelectionKey. If a
SelectionKey is expired, the request will be resumed and the
HTTP request will complete,
protected void cancelKey(SelectionKey key)
SelectionKey, and delegate the request
polling interruption to the CometEngine
key - the expired SelectionKeyprotected void cancelCometTask(CometTask cometTask)
public void registerKey(SelectionKey key,
CometTask cometTask)
SelectionKey to the Selector. We
cannot register the SelectionKey directy on the
Selector because there is a deadlock in the VM (see bug XXX).
public void wakeup()
Selector
public SelectionKey cometKeyFor(SelectableChannel channel)
public void resetSpinCounter()
public int getSpinRate()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||