org.glassfish.grizzly.web.arp
Class AsyncProcessorTask
java.lang.Object
org.glassfish.grizzly.web.TaskBase
org.glassfish.grizzly.web.arp.AsyncProcessorTask
- All Implemented Interfaces:
- Runnable, Callable, AsyncTask, Task
public class AsyncProcessorTask
- extends TaskBase
- implements AsyncTask
A Task that wraps the execution of an asynchronous execution
of a ProcessorTask. Internaly, this class invoke the associated
AsyncExecutor method to execute the ProcessorTask
lifecycle operations.
- Author:
- Jeanfrancois Arcand
| Methods inherited from class org.glassfish.grizzly.web.TaskBase |
call, execute, getConnection, getTaskListener, getThreadPool, getWebFilter, run, setConnection, setTaskListener, setThreadPool, setWebFilter |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.lang.Runnable |
run |
| Methods inherited from interface java.util.concurrent.Callable |
call |
AsyncProcessorTask
public AsyncProcessorTask()
doTask
public void doTask()
throws IOException
- Execute the
AsyncExecutor based on the stage
of the ProcessorTask execution.
- Specified by:
doTask in interface Task
- Throws:
IOException
getStage
public int getStage()
- Return the
stage of the current execution.
- Specified by:
getStage in interface AsyncTask
recycle
public void recycle()
- Reset the object.
- Specified by:
recycle in interface Task- Overrides:
recycle in class TaskBase
setAsyncExecutor
public void setAsyncExecutor(AsyncExecutor asyncExecutor)
- Set the
AsyncExecutor used by this Task
to delegate the execution of a ProcessorTask.
- Specified by:
setAsyncExecutor in interface AsyncTask
getAsyncExecutor
public AsyncExecutor getAsyncExecutor()
- Get the
AsyncExecutor.
- Specified by:
getAsyncExecutor in interface AsyncTask
setStage
public void setStage(int stage)
- Set the current execution stage.
Copyright © 2009 SUN Microsystems. All Rights Reserved.