|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.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 |
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. |
void |
registerKey(SelectionKey key,
CometTask cometTask)
Register the SelectionKey/code> to the |
void |
start()
Start the java.nio.channels.Selector running on its
Thread. |
void |
wakeup()
Wakes up the java.nio.channels.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()
java.nio.channels.Selector running on its
Thread.
protected 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 SelectionKey
public void registerKey(SelectionKey key,
CometTask cometTask)
SelectionKey/code> to the Selector. We
cannot register the SelectionKey/code> directy on the
Selector because there is a deadlock in the VM (see bug XXX).
public void wakeup()
java.nio.channels.Selector
public SelectionKey cometKeyFor(SelectableChannel channel)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||