Class AnalyzeTargetTask
- java.lang.Object
- 
- jadex.commons.SimplePropertyObject
- 
- jadex.extension.envsupport.environment.AbstractTask
- 
- jadex.bdi.examples.marsworld.sentry.AnalyzeTargetTask
 
 
 
- 
- All Implemented Interfaces:
- IPropertyObject,- IObjectTask
 
 public class AnalyzeTargetTask extends AbstractTask Analyze a given target.
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringPROPERTY_OREThe property for the ore amount.static java.lang.StringPROPERTY_STATEThe state for targets (unknown, analyzing, analyzed).static java.lang.StringPROPERTY_TARGETThe property for the target.static java.lang.StringPROPERTY_TYPENAMEThe type name property.static java.lang.StringSTATE_ANALYZEDThe unknown state for target.static java.lang.StringSTATE_ANALYZINGThe unknown state for target.static java.lang.StringSTATE_UNKNOWNThe unknown state for target.protected ISpaceObjecttargetThe target.protected inttimeThe remaining time.static intTIMEThe time required for analyzing a target (in millis).- 
Fields inherited from class jadex.extension.envsupport.environment.AbstractTaskcondition, finished, PROPERTY_CONDITION
 - 
Fields inherited from class jadex.commons.SimplePropertyObjectpcs, properties
 - 
Fields inherited from interface jadex.extension.envsupport.environment.IObjectTaskPROPERTY_ID
 
- 
 - 
Constructor SummaryConstructors Constructor Description AnalyzeTargetTask()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute(IEnvironmentSpace space, ISpaceObject obj, long progress, IClockService clock)Executes the task.voidstart(ISpaceObject obj)This method will be executed by the object before the task gets added to the execution queue.- 
Methods inherited from class jadex.extension.envsupport.environment.AbstractTaskisFinished, setFinished, shutdown
 - 
Methods inherited from class jadex.commons.SimplePropertyObjectaddPropertyChangeListener, getProperties, getProperty, getPropertyNames, hasProperty, removePropertyChangeListener, setProperties, setProperty, toString
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface jadex.commons.IPropertyObjectgetProperty, getPropertyNames, hasProperty, setProperty
 
- 
 
- 
- 
- 
Field Detail- 
PROPERTY_TYPENAMEpublic static final java.lang.String PROPERTY_TYPENAME The type name property.- See Also:
- Constant Field Values
 
 - 
PROPERTY_TARGETpublic static final java.lang.String PROPERTY_TARGET The property for the target.- See Also:
- Constant Field Values
 
 - 
PROPERTY_STATEpublic static final java.lang.String PROPERTY_STATE The state for targets (unknown, analyzing, analyzed).- See Also:
- Constant Field Values
 
 - 
STATE_UNKNOWNpublic static final java.lang.String STATE_UNKNOWN The unknown state for target.- See Also:
- Constant Field Values
 
 - 
STATE_ANALYZINGpublic static final java.lang.String STATE_ANALYZING The unknown state for target.- See Also:
- Constant Field Values
 
 - 
STATE_ANALYZEDpublic static final java.lang.String STATE_ANALYZED The unknown state for target.- See Also:
- Constant Field Values
 
 - 
PROPERTY_OREpublic static final java.lang.String PROPERTY_ORE The property for the ore amount.- See Also:
- Constant Field Values
 
 - 
TIMEpublic static final int TIME The time required for analyzing a target (in millis).- See Also:
- Constant Field Values
 
 - 
targetprotected ISpaceObject target The target.
 - 
timeprotected int time The remaining time.
 
- 
 - 
Method Detail- 
startpublic void start(ISpaceObject obj) This method will be executed by the object before the task gets added to the execution queue.- Specified by:
- startin interface- IObjectTask
- Overrides:
- startin class- AbstractTask
- Parameters:
- obj- The object that is executing the task.
 
 - 
executepublic void execute(IEnvironmentSpace space, ISpaceObject obj, long progress, IClockService clock) Executes the task. Handles exceptions. Subclasses should implement doExecute() instead.- Specified by:
- executein interface- IObjectTask
- Overrides:
- executein class- AbstractTask
- 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.
 
 
- 
 
-