|
Jadex 0.96-beta1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjadex.util.concurrent.Executor
public class Executor
A helper class for running a single instance of code using the thread pool. The code to be executed has to be placed in the code() method. Once created, the execute() method may be called as often as desired. When no thread is currently executing the object, a new thread is used from the thread pool. Otherwise, the already existing thread continues execution. After shutdown() is called, the executor stops execution, even when execute() is called afterwards.
Constructor Summary | |
---|---|
Executor()
Create an executor object. |
|
Executor(IExecutable executable)
Create an executor object. |
Method Summary | |
---|---|
void |
execute()
Make sure a thread is executing the code. |
void |
resume()
Resume a task. |
void |
run()
Execute the code. |
void |
shutdown()
Shutdown the executor. |
void |
suspend()
Suspend a task. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Executor()
public Executor(IExecutable executable)
Method Detail |
---|
public void run()
run
in interface Runnable
public void execute()
public void suspend()
public void resume()
public void shutdown()
|
Jadex 0.96-beta1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (C) 2002-2007 Lars Braubach, Alexander Pokahr - University of Hamburg. Use is subject to license terms.