|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.grizzly.http.TaskBase
com.sun.grizzly.comet.CometTask
public class CometTask
A Task
implementation that allow Grizzly ARP to notify
CometHandler
when new data (bytes) are available from the
CometSelector
.
Nested Class Summary | |
---|---|
static class |
CometTask.OP_EVENT
|
Field Summary | |
---|---|
protected CometTask.OP_EVENT |
upcoming_op
The current non blocking operation. |
Fields inherited from class com.sun.grizzly.http.TaskBase |
---|
listeners, pipeline, recycle, selectorThread, type |
Fields inherited from interface com.sun.grizzly.http.Task |
---|
ACCEPT_TASK, PROCESSOR_TASK, READ_TASK |
Constructor Summary | |
---|---|
CometTask()
New CometTask . |
Method Summary | |
---|---|
void |
doTask()
Notify the CometHandler that bytes are available for read. |
CometContext |
getCometContext()
Return the CometContext associated with this instance. |
SelectionKey |
getCometKey()
Return the CometSelector 's SelectionKey . |
CometSelector |
getCometSelector()
Return the CometSelector |
long |
getExpirationDelay()
Return the delay before interrupting the polled request and cancelling the SelectionKey . |
long |
getExpireTime()
Return the time in milliseconds before this object was registered the SelectionKey on the CometSelector |
SelectionKey |
getSelectionKey()
Return the SelectionKey |
boolean |
isAsyncReadSupported()
|
void |
recycle()
Recycle this object. |
void |
setAsyncReadSupported(boolean asyncReadSupported)
|
void |
setCometContext(CometContext cometContext)
Set the CometContext used to notify CometHandler . |
void |
setCometKey(SelectionKey cometKey)
Set the CometSelector 's SelectionKey . |
void |
setCometSelector(CometSelector cometSelector)
Set the CometSelector |
void |
setExpirationDelay(long expirationDelay)
Set the delay before interrupting the polled request and cancelling the SelectionKey . |
void |
setExpireTime(long expireTime)
Set the time in milliseconds before this object was registered the SelectionKey on the CometSelector |
void |
setSelectionKey(SelectionKey key)
Set the SelectionKey |
void |
taskEvent(TaskEvent event)
Not used. |
Methods inherited from class com.sun.grizzly.http.TaskBase |
---|
addTaskListener, call, cancelTask, clearTaskListeners, execute, fireTaskEvent, getKeepAliveStats, getPipeline, getRecycle, getRequestGroupInfo, getSelectorThread, getSocket, getTaskListeners, getType, isMonitoringEnabled, removeTaskListener, run, setPipeline, setRecycle, setSelectorThread |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected CometTask.OP_EVENT upcoming_op
Constructor Detail |
---|
public CometTask()
CometTask
.
Method Detail |
---|
public void doTask() throws IOException
CometHandler
that bytes are available for read.
The notification will invoke all CometContext
IOException
public void taskEvent(TaskEvent event)
taskEvent
in interface TaskListener
taskEvent
in class TaskBase
public CometContext getCometContext()
CometContext
associated with this instance.
CometContext
associated with this
instance.public void setCometContext(CometContext cometContext)
CometContext
used to notify CometHandler
.
cometContext
- the CometContext
used to notify CometHandler
public SelectionKey getSelectionKey()
SelectionKey
getSelectionKey
in interface Task
getSelectionKey
in class TaskBase
SelectionKey
public void setSelectionKey(SelectionKey key)
SelectionKey
setSelectionKey
in interface Task
setSelectionKey
in class TaskBase
SelectionKey
- SelectionKey
public void recycle()
recycle
in interface Task
recycle
in class TaskBase
public CometSelector getCometSelector()
CometSelector
CometSelector
public void setCometSelector(CometSelector cometSelector)
CometSelector
cometSelector
- the CometSelector
public long getExpireTime()
SelectionKey
on the CometSelector
SelectionKey
on the
CometSelector
public void setExpireTime(long expireTime)
SelectionKey
on the CometSelector
expireTime
- Return the time in milliseconds before this object was
registered the SelectionKey
on the
CometSelector
public long getExpirationDelay()
SelectionKey
.
SelectionKey
.public void setExpirationDelay(long expirationDelay)
SelectionKey
.
expirationDelay
- Return the delay before interrupting the polled
request and cancelling
the SelectionKey
.public SelectionKey getCometKey()
CometSelector
's SelectionKey
.
public void setCometKey(SelectionKey cometKey)
CometSelector
's SelectionKey
.
public boolean isAsyncReadSupported()
public void setAsyncReadSupported(boolean asyncReadSupported)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |