|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.grizzly.arp.DefaultAsyncExecutor
public class DefaultAsyncExecutor
Default implementation of the AsyncExecutor. This class will
execute a ProcessorTask asynchronously, by interrupting the
process based on the logic defined in its associated AsyncFilter
If no AsyncFilter are defined, the ProcessorTask
will not be interrupted and executed synchronously.
| Constructor Summary | |
|---|---|
DefaultAsyncExecutor()
|
|
| Method Summary | |
|---|---|
void |
addAsyncFilter(AsyncFilter asyncFilter)
Add an AsyncFilter |
boolean |
execute()
Execute the associated Adapter or GrizzlyAdapter |
AsyncHandler |
getAsyncHandler()
Get the AsyncHandler who drive the asynchronous process. |
AsyncTask |
getAsyncTask()
Return AsyncTask. |
ProcessorTask |
getProcessorTask()
The ProcessorTask used to execute the request processing. |
boolean |
interrupt()
Interrupt the ProcessorTask if AsyncFilter
has been defined. |
protected static void |
loadFilters()
Load the list of AsynchFilter. |
boolean |
postExecute()
Resume the connection by commit the Response object. |
boolean |
preExecute()
Pre-execute a ProcessorTask by parsing the request
line. |
boolean |
removeAsyncFilter(AsyncFilter asyncFilter)
Remove an AsyncFilter |
void |
setAsyncHandler(AsyncHandler asyncHandler)
Set the AsyncHandler who drive the asynchronous process. |
void |
setAsyncTask(AsyncTask asyncProcessorTask)
Set the AsyncTask. |
void |
setProcessorTask(ProcessorTask task)
Set the ProcessorTask used to execute the request processing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultAsyncExecutor()
| Method Detail |
|---|
public boolean preExecute()
throws Exception
ProcessorTask by parsing the request
line.
preExecute in interface AsyncExecutorException
public boolean interrupt()
throws Exception
ProcessorTask if AsyncFilter
has been defined.
interrupt in interface AsyncExecutorException
public boolean execute()
throws Exception
Adapter or GrizzlyAdapter
execute in interface AsyncExecutorException
public boolean postExecute()
throws Exception
Response object.
postExecute in interface AsyncExecutorExceptionpublic void setAsyncTask(AsyncTask asyncProcessorTask)
AsyncTask.
setAsyncTask in interface AsyncExecutorpublic AsyncTask getAsyncTask()
AsyncTask.
getAsyncTask in interface AsyncExecutorpublic void addAsyncFilter(AsyncFilter asyncFilter)
AsyncFilter
addAsyncFilter in interface AsyncExecutorpublic boolean removeAsyncFilter(AsyncFilter asyncFilter)
AsyncFilter
removeAsyncFilter in interface AsyncExecutorpublic AsyncHandler getAsyncHandler()
AsyncHandler who drive the asynchronous process.
getAsyncHandler in interface AsyncExecutorpublic void setAsyncHandler(AsyncHandler asyncHandler)
AsyncHandler who drive the asynchronous process.
setAsyncHandler in interface AsyncExecutorpublic void setProcessorTask(ProcessorTask task)
ProcessorTask used to execute the request processing.
setProcessorTask in interface AsyncExecutortask - a ProcessorTaskpublic ProcessorTask getProcessorTask()
ProcessorTask used to execute the request processing.
getProcessorTask in interface AsyncExecutorProcessorTask used to execute the request processing.protected static void loadFilters()
AsynchFilter.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||