|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.enterprise.web.ara.TaskWrapper
com.sun.enterprise.web.ara.IsolatedTask
public class IsolatedTask
This task is used to configure an instance of .ReadTask based
on the Rule implementation.
| Field Summary | |
|---|---|
protected StreamAlgorithm |
algorithm
The algorithm used to determine the context-root, the HTTP method, the protocol etc. |
protected int |
initialByteLimit
The ByteBuffer initial limit before applying the
Algorithm |
protected int |
initialBytePosition
The ByteBuffer initial position before applying the
Algorithm |
static int |
ISOLATED_TASK
|
protected ArrayList<TaskListener> |
listeners
List of listeners |
protected Pipeline |
pipeline
The Thread Pool wrapper. |
protected RulesExecutor |
rulesExecutor
The RuleExecutor used to apply Rule |
protected TaskEvent<IsolatedTask> |
taskEvent
The TaskEvent used between this task and it's attached
ReadTask |
| Fields inherited from class com.sun.enterprise.web.ara.TaskWrapper |
|---|
wrappedTask |
| Fields inherited from interface com.sun.enterprise.web.connector.grizzly.Task |
|---|
ACCEPT_TASK, PROCESSOR_TASK, READ_TASK |
| Constructor Summary | |
|---|---|
IsolatedTask()
|
|
| Method Summary | |
|---|---|
void |
addTaskListener(TaskListener task)
Add the given TaskListener to this Task. |
void |
clearTaskListeners()
Clean all the listeners of this Task |
void |
doTask()
Apply a set of Rules to the current bytes requests using
an instance of ReadTask byte buffer. |
void |
execute()
Execute that task using the current Thread. |
protected void |
fireTaskEvent(TaskEvent<?> event)
Notify listeners of that class that the processing has completed. |
Pipeline |
getPipeline()
Get the Thread pool wrapper. |
int |
getType()
This task type. |
void |
removeTaskListener(TaskListener task)
Remove the given TaskListener/code> from this
|
void |
run()
Execute the logic required to isolate the task. |
void |
setAlgorithm(StreamAlgorithm algorithm)
Set the Algorithm used by this task. |
void |
setPipeline(Pipeline pipeline)
Set the Thread pool wrapper. |
void |
setRulesExecutor(RulesExecutor rulesExecutor)
Set the RuleExecutor instance used by this task. |
void |
taskEvent(TaskEvent event)
Remove the SelectionKey from the cache. |
IsolatedTask |
wrap(Task task)
Wrao the Task with this task. |
| Methods inherited from class com.sun.enterprise.web.ara.TaskWrapper |
|---|
call, cancelTask, getKeepAliveStats, getRecycle, getRequestGroupInfo, getSelectionKey, getSelectorThread, getTaskListeners, getWrappedTask, isMonitoringEnabled, recycle, setRecycle, setSelectionKey, setSelectorThread |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ISOLATED_TASK
protected StreamAlgorithm algorithm
protected RulesExecutor rulesExecutor
RuleExecutor used to apply Rule
protected ArrayList<TaskListener> listeners
protected int initialBytePosition
ByteBuffer initial position before applying the
Algorithm
protected int initialByteLimit
ByteBuffer initial limit before applying the
Algorithm
protected TaskEvent<IsolatedTask> taskEvent
TaskEvent used between this task and it's attached
ReadTask
protected Pipeline pipeline
| Constructor Detail |
|---|
public IsolatedTask()
| Method Detail |
|---|
public void doTask()
throws IOException
Rules to the current bytes requests using
an instance of ReadTask byte buffer. Once the
Rule has been successfully applied, execute it.
doTask in interface TaskdoTask in class TaskWrapperIOExceptionpublic void setRulesExecutor(RulesExecutor rulesExecutor)
RuleExecutor instance used by this task.
public void setAlgorithm(StreamAlgorithm algorithm)
Algorithm used by this task.
public IsolatedTask wrap(Task task)
Task with this task.
wrap in class TaskWrapperpublic void execute()
execute in interface Taskexecute in class TaskWrapperpublic void run()
run in interface Runnablerun in class TaskWrapperpublic void addTaskListener(TaskListener task)
TaskListener to this Task.
addTaskListener in interface TaskaddTaskListener in class TaskWrapperpublic void removeTaskListener(TaskListener task)
TaskListener/code> from this
Task.
- Specified by:
removeTaskListener in interface Task- Overrides:
removeTaskListener in class TaskWrapper
public void clearTaskListeners()
Task
clearTaskListeners in interface TaskclearTaskListeners in class TaskWrapperprotected void fireTaskEvent(TaskEvent<?> event)
public void taskEvent(TaskEvent event)
SelectionKey from the cache.
taskEvent in interface TaskListenerpublic int getType()
getType in interface TaskgetType in class TaskWrapperpublic void setPipeline(Pipeline pipeline)
Thread pool wrapper.
setPipeline in interface Taskpublic Pipeline getPipeline()
Thread pool wrapper.
getPipeline in interface Task
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||