Class AnalyzeTargetTask

    • Field Detail

      • PROPERTY_TYPENAME

        public static final java.lang.String PROPERTY_TYPENAME
        The type name property.
        See Also:
        Constant Field Values
      • PROPERTY_TARGET

        public static final java.lang.String PROPERTY_TARGET
        The property for the target.
        See Also:
        Constant Field Values
      • PROPERTY_STATE

        public static final java.lang.String PROPERTY_STATE
        The state for targets (unknown, analyzing, analyzed).
        See Also:
        Constant Field Values
      • STATE_UNKNOWN

        public static final java.lang.String STATE_UNKNOWN
        The unknown state for target.
        See Also:
        Constant Field Values
      • STATE_ANALYZING

        public static final java.lang.String STATE_ANALYZING
        The unknown state for target.
        See Also:
        Constant Field Values
      • STATE_ANALYZED

        public static final java.lang.String STATE_ANALYZED
        The unknown state for target.
        See Also:
        Constant Field Values
      • PROPERTY_ORE

        public static final java.lang.String PROPERTY_ORE
        The property for the ore amount.
        See Also:
        Constant Field Values
      • TIME

        public static final int TIME
        The time required for analyzing a target (in millis).
        See Also:
        Constant Field Values
      • time

        protected int time
        The remaining time.
    • Constructor Detail

      • AnalyzeTargetTask

        public AnalyzeTargetTask()
    • Method Detail

      • start

        public void start​(ISpaceObject obj)
        This method will be executed by the object before the task gets added to the execution queue.
        Specified by:
        start in interface IObjectTask
        Overrides:
        start in class AbstractTask
        Parameters:
        obj - The object that is executing the task.
      • execute

        public void execute​(IEnvironmentSpace space,
                            ISpaceObject obj,
                            long progress,
                            IClockService clock)
        Executes the task. Handles exceptions. Subclasses should implement doExecute() instead.
        Specified by:
        execute in interface IObjectTask
        Overrides:
        execute in 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.