|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectappl.parallel.thread.OneMethodThread
public abstract class OneMethodThread
Executes a method call in a single Thread
Field Summary | |
---|---|
protected Object |
executionResult
|
Constructor Summary | |
---|---|
OneMethodThread(String threadName,
int priority,
Object... parameters)
Creates a new Thread. |
Method Summary | |
---|---|
Object |
getExecutionResult()
the execution result must be explicitly set in the run() method. |
Object |
getParameter(int paraNo)
|
void |
join()
waits until the encapulated Thread has finished |
abstract void |
run()
|
void |
start()
Starts the thread |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Object executionResult
Constructor Detail |
---|
public OneMethodThread(String threadName, int priority, Object... parameters)
start()
it.
threadName
- a name for the thread (usefull while debugging)priority
- a priority for the Threadparameters
- the parameters may be used later in the run method by calling the getParameter(int)
methodMethod Detail |
---|
public abstract void run()
run
in interface Runnable
public void start()
public Object getParameter(int paraNo)
paraNo
- the position in the given parameter array
public void join()
public Object getExecutionResult()
run()
method.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |