|
||||||||||
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 |
boolean |
finishExecute()
Resume the connection by commit the Response object. |
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 ArrayList<AsyncFilter> |
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 |
reset()
Reset |
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 AsyncExecutor
Exception
public boolean interrupt() throws Exception
ProcessorTask
if AsyncFilter
has been defined.
interrupt
in interface AsyncExecutor
Exception
public boolean execute() throws Exception
Adapter
or GrizzlyAdapter
execute
in interface AsyncExecutor
Exception
public boolean postExecute() throws Exception
Response
object.
postExecute
in interface AsyncExecutor
Exception
public boolean finishExecute() throws Exception
Response
object.
finishExecute
in interface AsyncExecutor
Exception
public void setAsyncTask(AsyncTask asyncProcessorTask)
AsyncTask
.
setAsyncTask
in interface AsyncExecutor
public AsyncTask getAsyncTask()
AsyncTask
.
getAsyncTask
in interface AsyncExecutor
public void addAsyncFilter(AsyncFilter asyncFilter)
AsyncFilter
addAsyncFilter
in interface AsyncExecutor
public boolean removeAsyncFilter(AsyncFilter asyncFilter)
AsyncFilter
removeAsyncFilter
in interface AsyncExecutor
public AsyncHandler getAsyncHandler()
AsyncHandler
who drive the asynchronous process.
getAsyncHandler
in interface AsyncExecutor
public void setAsyncHandler(AsyncHandler asyncHandler)
AsyncHandler
who drive the asynchronous process.
setAsyncHandler
in interface AsyncExecutor
public void setProcessorTask(ProcessorTask task)
ProcessorTask
used to execute the request processing.
setProcessorTask
in interface AsyncExecutor
task
- a ProcessorTask
public ProcessorTask getProcessorTask()
ProcessorTask
used to execute the request processing.
getProcessorTask
in interface AsyncExecutor
ProcessorTask
used to execute the request processing.protected static ArrayList<AsyncFilter> loadFilters()
AsynchFilter
.
public void reset()
reset
in interface AsyncExecutor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |