com.sun.grizzly.http
Interface AsyncTask

All Superinterfaces:
Callable, Runnable, Task
All Known Implementing Classes:
AsyncProcessorTask

public interface AsyncTask
extends Task

A Task that wraps the execution of an asynchronous execution of a ProcessorTask.

Author:
Jean-Francois Arcand

Field Summary
static int COMPLETED
           
static int EXECUTE
           
static int INTERRUPTED
           
static int POST_EXECUTE
           
static int PRE_EXECUTE
           
 
Fields inherited from interface com.sun.grizzly.http.Task
ACCEPT_TASK, PROCESSOR_TASK, READ_TASK
 
Method Summary
 AsyncExecutor getAsyncExecutor()
          Get the AsyncExecutor.
 ProcessorTask getProcessorTask()
          Return the ProcessorTask.
 int getStage()
          Return the stage of the current execution.
 void setAsyncExecutor(AsyncExecutor asyncExecutor)
          Set the AsyncExecutor used by this Task to delegate the execution of a ProcessorTask.
 void setProcessorTask(ProcessorTask processorTask)
          Set the ProcessorTask that needs to be executed asynchronously.
 
Methods inherited from interface com.sun.grizzly.http.Task
addTaskListener, cancelTask, clearTaskListeners, doTask, execute, getKeepAliveStats, getPipeline, getRecycle, getRequestGroupInfo, getSelectionKey, getSelectorThread, getTaskListeners, getType, isMonitoringEnabled, recycle, removeTaskListener, setPipeline, setRecycle, setSelectionKey, setSelectorThread
 
Methods inherited from interface java.lang.Runnable
run
 
Methods inherited from interface java.util.concurrent.Callable
call
 

Field Detail

PRE_EXECUTE

static final int PRE_EXECUTE
See Also:
Constant Field Values

INTERRUPTED

static final int INTERRUPTED
See Also:
Constant Field Values

POST_EXECUTE

static final int POST_EXECUTE
See Also:
Constant Field Values

COMPLETED

static final int COMPLETED
See Also:
Constant Field Values

EXECUTE

static final int EXECUTE
See Also:
Constant Field Values
Method Detail

getAsyncExecutor

AsyncExecutor getAsyncExecutor()
Get the AsyncExecutor.


getProcessorTask

ProcessorTask getProcessorTask()
Return the ProcessorTask.


getStage

int getStage()
Return the stage of the current execution.


setAsyncExecutor

void setAsyncExecutor(AsyncExecutor asyncExecutor)
Set the AsyncExecutor used by this Task to delegate the execution of a ProcessorTask.


setProcessorTask

void setProcessorTask(ProcessorTask processorTask)
Set the ProcessorTask that needs to be executed asynchronously.



Copyright © 2011 SUN Microsystems. All Rights Reserved.