|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Task
Wrapper object used by the WorkerThread
Field Summary | |
---|---|
static int |
ACCEPT_TASK
|
static int |
PROCESSOR_TASK
|
static int |
READ_TASK
|
Method Summary | |
---|---|
void |
doTask()
Execute the task. |
void |
execute()
Execute this task by using the associated ExecutorService . |
void |
execute(ExecutorService threadPool)
Execute this task using the passed ExecutorService . |
SelectionKey |
getSelectionKey()
Return the SelectionKey associated with this tasks. |
SelectorHandler |
getSelectorHandler()
Returns SelectorHandler , which handles this taks's SelectionKey |
SelectorThread |
getSelectorThread()
Returns the SelectorThread used by this task. |
ExecutorService |
getThreadPool()
Return the thread pool used by this object. |
int |
getType()
Return this Tash type. |
void |
recycle()
Recycle this task. |
void |
setSelectionKey(SelectionKey key)
Set the SelectionKey |
void |
setSelectorHandler(SelectorHandler selectorHandler)
Sets SelectorHandler , which handles this taks's SelectionKey |
void |
setSelectorThread(SelectorThread selectorThread)
Set the SelectorThread used by this task. |
void |
setThreadPool(ExecutorService threadPool)
Set the thread pool on which Worker Threads will synchronize. |
Methods inherited from interface java.lang.Runnable |
---|
run |
Methods inherited from interface java.util.concurrent.Callable |
---|
call |
Field Detail |
---|
static final int ACCEPT_TASK
static final int READ_TASK
static final int PROCESSOR_TASK
Method Detail |
---|
int getType()
Tash
type.
void doTask() throws IOException
IOException
void setSelectionKey(SelectionKey key)
SelectionKey
SelectionKey getSelectionKey()
SelectionKey
associated with this tasks.
void setSelectorThread(SelectorThread selectorThread)
SelectorThread
used by this task.
SelectorThread getSelectorThread()
SelectorThread
used by this task.
SelectorHandler getSelectorHandler()
SelectorHandler
, which handles this taks's SelectionKey
SelectorHandler
, which handles this taks's SelectionKey
void setSelectorHandler(SelectorHandler selectorHandler)
SelectorHandler
, which handles this taks's SelectionKey
{@link
- SelectorHandler}, which handles this taks's SelectionKey
void execute()
ExecutorService
.
If the ExecutorService
is null, the task's doTask()
method will be invoked.
void execute(ExecutorService threadPool)
ExecutorService
.
If the ExecutorService
is null, the task's doTask()
method will be invoked.
void recycle()
void setThreadPool(ExecutorService threadPool)
ExecutorService getThreadPool()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |