org.objectweb.dream.control.activity.task.thread
Class BasicThreadTask
java.lang.Object
org.objectweb.dream.AbstractComponent
org.objectweb.dream.control.activity.task.thread.AbstractThreadTask
org.objectweb.dream.control.activity.task.thread.BasicThreadTask
- All Implemented Interfaces:
- BindingController, LifeCycleController, Loggable, Runnable, Task, TaskLifeCycleController
- public class BasicThreadTask
- extends AbstractThreadTask
- implements Runnable, TaskLifeCycleController
Basic implementation of a Dream thread.
- See Also:
AbstractThreadTask
Fields inherited from interface org.objectweb.dream.control.activity.task.Task |
ITF_NAME |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
threadTaskLock
protected Object threadTaskLock
thread
protected Thread thread
taskStoppedListeners
protected List taskStoppedListeners
executing
protected boolean executing
BasicThreadTask
public BasicThreadTask()
isExecuting
protected boolean isExecuting()
- Description copied from class:
AbstractThreadTask
- Called by
AbstractThreadTask.execute(Object)
method.
- Specified by:
isExecuting
in class AbstractThreadTask
- Returns:
false
if the AbstractThreadTask.execute(Object)
method must
return.- See Also:
AbstractThreadTask.isExecuting()
setExecuting
protected void setExecuting(boolean b)
- Description copied from class:
AbstractThreadTask
- Called by
AbstractThreadTask.execute(Object)
method. Sets its execution state.
- Specified by:
setExecuting
in class AbstractThreadTask
- Parameters:
b
- false
if the AbstractThreadTask.execute(Object)
method must
return.- See Also:
AbstractThreadTask.setExecuting(boolean)
run
public void run()
- Specified by:
run
in interface Runnable
- See Also:
Runnable.run()
startFc
public void startFc()
throws IllegalLifeCycleException
- Specified by:
startFc
in interface LifeCycleController
- Overrides:
startFc
in class AbstractComponent
- Throws:
IllegalLifeCycleException
- See Also:
LifeCycleController.startFc()
stopFc
public void stopFc()
throws IllegalLifeCycleException
- Specified by:
stopFc
in interface LifeCycleController
- Overrides:
stopFc
in class AbstractComponent
- Throws:
IllegalLifeCycleException
- See Also:
LifeCycleController.stopFc()
asyncStop
public void asyncStop(TaskStoppedListener listener)
- Description copied from interface:
TaskLifeCycleController
- Stops asynchronously the task, this interface belong. This method returns
immediatly. The given listener will be notified when the task has stopped.
If the task is already in the
LifeCycleController.STOPPED
state,
the listener is immediatly notified.
- Specified by:
asyncStop
in interface TaskLifeCycleController
- Parameters:
listener
- listener nitified when the task has stopped.- See Also:
TaskLifeCycleController.asyncStop(TaskStoppedListener)
Copyright © 2003, 2004 - INRIA Rhone-Alpes - All Rights Reserved.