Interface IObjectTask
-
- All Superinterfaces:
IPropertyObject
- All Known Implementing Classes:
AbstractTask
,AnalyzeTargetTask
,AnalyzeTargetTask
,AnalyzeTargetTask
,ClearChemicalsTask
,ClearChemicalsTask
,DeliverPatientTask
,DeliverPatientTask
,ExtinguishFireTask
,ExtinguishFireTask
,LoadBatteryTask
,LoadOreTask
,LoadOreTask
,LoadOreTask
,Move3DTask
,MoveTask
,MoveTask
,MoveTask
,MoveTask
,MoveTask
,MoveTask
,ProduceOreTask
,ProduceOreTask
,ProduceOreTask
,Rotation3DTask
,RotationTask
,RotationTask
,RotationTask
,TreatVictimTask
,TreatVictimTask
public interface IObjectTask extends IPropertyObject
Interface for a task of an object.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROPERTY_ID
The property for holding the task id.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
execute(IEnvironmentSpace space, ISpaceObject obj, long progress, IClockService clock)
Executes the task.boolean
isFinished(IEnvironmentSpace space, ISpaceObject obj)
Check if a task is finished and should be removed.void
shutdown(ISpaceObject obj)
This method will be executed by the object before the task is removed from the execution queue.void
start(ISpaceObject obj)
This method will be executed by the object before the task gets added to the execution queue.-
Methods inherited from interface jadex.commons.IPropertyObject
getProperty, getPropertyNames, hasProperty, setProperty
-
-
-
-
Field Detail
-
PROPERTY_ID
static final java.lang.String PROPERTY_ID
The property for holding the task id.- See Also:
- Constant Field Values
-
-
Method Detail
-
start
void start(ISpaceObject obj)
This method will be executed by the object before the task gets added to the execution queue.- Parameters:
space
- The environment in which the task is executing.obj
- The object that is executing the task.
-
shutdown
void shutdown(ISpaceObject obj)
This method will be executed by the object before the task is removed from the execution queue.- Parameters:
space
- The environment in which the task is executing.obj
- The object that is executing the task.
-
execute
void execute(IEnvironmentSpace space, ISpaceObject obj, long progress, IClockService clock)
Executes the task.- Parameters:
space
- The environment in which the task is executing.obj
- The object that is executing the task.progress
- The time that has passed according to the environment executor.clock
- The clock service.
-
isFinished
boolean isFinished(IEnvironmentSpace space, ISpaceObject obj)
Check if a task is finished and should be removed. Finished tasks will no longer be executed.- Returns:
- True, if the task is finished.
-
-