FileDocCategorySizeDatePackage
Task.javaAPI DocGlassfish v2 API4992Fri May 04 22:37:06 BST 2007com.sun.enterprise.web.connector.grizzly

Task

public interface Task implements Runnable, Callable
Wrapper object used by the WorkerThread
author
Jean-Francois Arcand

Fields Summary
public static int
ACCEPT_TASK
public static int
READ_TASK
public static int
PROCESSOR_TASK
Constructors Summary
Methods Summary
public voidaddTaskListener(TaskListener task)
Add a Task to this class.

public voidcancelTask(java.lang.String message, java.lang.String httpCode)
Cancel the task.

public voidclearTaskListeners()
Remove all listeners

public voiddoTask()
Execute the task.

public voidexecute()
Execute this task by using the associated Pipeline. If the Pipeline is null, the task's doTask() method will be invoked.

public KeepAliveStatsgetKeepAliveStats()
Gets the KeepAliveStats associated with this task.

public PipelinegetPipeline()
Return the pipeline used by this object.

public booleangetRecycle()
Return true if this Task will be recycled.

public org.apache.coyote.RequestGroupInfogetRequestGroupInfo()
Gets the RequestGroupInfo from this task.

public java.nio.channels.SelectionKeygetSelectionKey()
Return the SelectionKey associated with this tasks.

public SelectorThreadgetSelectorThread()
Returns the SelectorThread used by this task.

public java.util.ArrayListgetTaskListeners()
Return the ArrauList containing the listeners.

public intgetType()
Return this Tash type.

public booleanisMonitoringEnabled()
Returns true if monitoring has been enabled, false otherwise.

public voidrecycle()
Recycle this task.

public voidremoveTaskListener(TaskListener task)
Remove a Task to this class.

public voidsetPipeline(Pipeline pipeline)
Set the pipeline on which Worker Threads will synchronize.

public voidsetRecycle(boolean recycle)
Recycle the Task after every doTask invokation.

public voidsetSelectionKey(java.nio.channels.SelectionKey key)
Set the SelectionKey

public voidsetSelectorThread(SelectorThread selectorThread)
Set the SelectorThread used by this task.