|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.enterprise.web.connector.grizzly.async.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()
Interrupt the ProcessorTask if AsyncFilter
has been defined. |
AsyncHandler |
getAsyncHandler()
Get the AsyncHandler who drive the asynchronous process. |
AsyncTask |
getAsyncTask()
Return AsyncTask. |
boolean |
interrupt()
Interrupt the ProcessorTask if AsyncFilter
has been defined. |
protected static void |
loadFilters()
Load the list of AsynchFilter. |
boolean |
postExecute()
Post-execute the ProcessorTask by preparing the response,
flushing the response and then close or keep-alive the connection. |
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. |
| 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
ProcessorTask if AsyncFilter
has been defined.
execute in interface AsyncExecutorException
public boolean postExecute()
throws Exception
ProcessorTask by preparing the response,
flushing the response and then close or keep-alive the connection.
postExecute in interface AsyncExecutorExceptionpublic void setAsyncTask(AsyncTask asyncProcessorTask)
AsyncTask.
setAsyncTask in interface AsyncExecutorpublic AsyncTask getAsyncTask()
AsyncTask.
getAsyncTask in interface AsyncExecutorprotected static void loadFilters()
AsynchFilter.
public 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 AsyncExecutor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||