|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.grizzly.arp.DefaultAsyncHandler
public class DefaultAsyncHandler
Default implementation of AsyncHandler
. This class handle
the aysnchronous execution of a ProcessorTask
. The request
processing is executed by doing:
(1) Wrap the ProcessorTask
using an instance of
AsyncTask
(2) Execute the AsyncTask
using the wrapped
ProcessorTask
Pipeline
(3) If the AsyncTask
has been interrupted but ready
to be removed from the interrupted queue, remove it and execute the
remaining operations.
Constructor Summary | |
---|---|
DefaultAsyncHandler()
|
Method Summary | |
---|---|
void |
addAsyncFilter(AsyncFilter asyncFilter)
Add an AsyncFilter |
void |
addToInterruptedQueue(AsyncTask task)
Add a Task to the interrupted queue. |
String |
getAsyncExecutorClassName()
Get the code>AsyncExecutor used by this object. |
void |
handle(Task task)
Handle an instance of a Task . |
boolean |
removeAsyncFilter(AsyncFilter asyncFilter)
Remove an AsyncFilter |
void |
removeFromInterruptedQueue(AsyncTask task)
Remove the Task from the interrupted queue. |
void |
returnTask(AsyncTask asyncTask)
Return th Task to the pool |
void |
setAsyncExecutorClassName(String asyncExecutorClassName)
Set the AsyncExecutor used by this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultAsyncHandler()
Method Detail |
---|
public void handle(Task task)
Task
. This method is invoked
first by a ProcessorTask
, which delegate its execution to
this handler. Second, this method is invoked once a
ProcessorTask
needs to be removed from the interrupted queue.
handle
in interface AsyncHandler
public void returnTask(AsyncTask asyncTask)
Task
to the pool
returnTask
in interface AsyncHandler
public void addToInterruptedQueue(AsyncTask task)
Task
to the interrupted queue.
addToInterruptedQueue
in interface AsyncHandler
public void removeFromInterruptedQueue(AsyncTask task)
Task
from the interrupted queue.
removeFromInterruptedQueue
in interface AsyncHandler
public void setAsyncExecutorClassName(String asyncExecutorClassName)
AsyncExecutor
used by this object.
setAsyncExecutorClassName
in interface AsyncHandler
public String getAsyncExecutorClassName()
getAsyncExecutorClassName
in interface AsyncHandler
public void addAsyncFilter(AsyncFilter asyncFilter)
AsyncFilter
addAsyncFilter
in interface AsyncHandler
public boolean removeAsyncFilter(AsyncFilter asyncFilter)
AsyncFilter
removeAsyncFilter
in interface AsyncHandler
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |