|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.enterprise.web.connector.grizzly.TaskBase
com.sun.enterprise.web.connector.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.enterprise.web.connector.grizzly.TaskBase |
|---|
key, listeners, pipeline, recycle, selectorThread, type |
| Fields inherited from interface com.sun.enterprise.web.connector.grizzly.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 |
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 |
taskEvent(TaskEvent event)
Not used. |
| Methods inherited from class com.sun.enterprise.web.connector.grizzly.TaskBase |
|---|
addTaskListener, call, cancelTask, clearTaskListeners, execute, fireTaskEvent, getKeepAliveStats, getPipeline, getRecycle, getRequestGroupInfo, getSelectionKey, getSelectorThread, getSocket, getTaskListeners, getType, isMonitoringEnabled, removeTaskListener, run, setPipeline, setRecycle, setSelectionKey, 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
IOExceptionpublic void taskEvent(TaskEvent event)
taskEvent in interface TaskListenertaskEvent in class TaskBasepublic 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 CometHandlerpublic void recycle()
recycle in interface Taskrecycle in class TaskBasepublic CometSelector getCometSelector()
CometSelector
CometSelectorpublic void setCometSelector(CometSelector cometSelector)
CometSelector
cometSelector - the CometSelectorpublic long getExpireTime()
SelectionKey on the CometSelector
SelectionKey on the
CometSelectorpublic void setExpireTime(long expireTime)
SelectionKey on the CometSelector
expireTime - Return the time in milliseconds before this object was
registered the SelectionKey on the
CometSelectorpublic 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 | |||||||||