Package util
Class ObjExecutor
java.lang.Object
util.Executor
util.ObjExecutor
- All Implemented Interfaces:
Serializable
,Runnable
Class for executing an object as a thread.
When the object execution terminates, regardless of whether it terminates successfully or with failure, a listener function is notified, with an identifier of the event that occurred.
- Since:
- 2007.05.02
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionObjExecutor
(Executable obj, ActionListener listener) Create an object executor. -
Method Summary
Methods inherited from class util.Executor
getMessage, getStatus, start
-
Constructor Details
-
ObjExecutor
Create an object executor.On termination, the listener is notified. The identifier of the action event that is passed to the listener is
OK
if the object'sexec()
method terminated successfully,ABORTED
if the execution was aborted by a call to the functionabort()
andFAILURE
otherwise.- Parameters:
obj
- the object to execute as a threadlistener
- the listener to notify on completion- Since:
- 2007.05.03 (Christian Borgelt)
-
-
Method Details
-
run
public void run()Function for thread execution. -
abort
public void abort()Abort the execution. -
getObject
Get the object to execute as a thread.- Returns:
- the object to execute as a thread
- Since:
- 2007.05.03 (Christian Borgelt)
-