|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.web.TaskBase
public abstract class TaskBase
Abstract implementation of a Task object.
| Field Summary | |
|---|---|
protected Connection |
connection
The Connection used by this task. |
protected ExecutorService |
threadPool
The ExecutorService object associated with this
Task |
protected WebFilter |
webFilter
The WebFilter. |
| Constructor Summary | |
|---|---|
TaskBase()
|
|
| Method Summary | |
|---|---|
Object |
call()
By default, do nothing when a Callable is invoked. |
void |
execute()
Execute the task based on its ExecutorService. |
Connection |
getConnection()
|
TaskListener |
getTaskListener()
The TaskListener associated with this instance. |
ExecutorService |
getThreadPool()
Return the thread pool used by this object. |
WebFilter |
getWebFilter()
|
void |
recycle()
Recycle internal state. |
void |
run()
Some ExecutorService implementation requires a instance of
Runnable instance. |
void |
setConnection(Connection connection)
|
void |
setTaskListener(TaskListener taskListener)
Set the TaskListener associated with this class. |
void |
setThreadPool(ExecutorService threadPool)
Set the thread pool on which Worker Threads will synchronize. |
void |
setWebFilter(WebFilter webFilter)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.glassfish.grizzly.web.Task |
|---|
doTask |
| Field Detail |
|---|
protected ExecutorService threadPool
ExecutorService object associated with this
Task
protected Connection connection
Connection used by this task.
protected WebFilter webFilter
WebFilter.
| Constructor Detail |
|---|
public TaskBase()
| Method Detail |
|---|
public WebFilter getWebFilter()
public void setWebFilter(WebFilter webFilter)
public void setThreadPool(ExecutorService threadPool)
setThreadPool in interface Taskpublic ExecutorService getThreadPool()
getThreadPool in interface Taskpublic Connection getConnection()
getConnection in interface Taskpublic void setConnection(Connection connection)
setConnection in interface Taskpublic void execute()
ExecutorService. If the
ExecutorService is null, then execute the task on using the
calling thread.
execute in interface Taskpublic void recycle()
recycle in interface Taskpublic void run()
ExecutorService implementation requires a instance of
Runnable instance.
run in interface Runnable
public Object call()
throws Exception
Callable is invoked.
call in interface CallableExceptionpublic TaskListener getTaskListener()
TaskListener associated with this instance.
TaskListener associated with this instance.public void setTaskListener(TaskListener taskListener)
TaskListener associated with this class.
{@link - TaskListener} associated with this instance.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||