Class WakeUpTask

  • All Implemented Interfaces:
    Runnable

    public class WakeUpTask
    extends TimerTask
    Class used to schedule a wake up on a specific agent. A notification is sent to activate the agent.
    • Field Detail

      • logger

        private static final Logger logger
      • DEBUG

        private static final boolean DEBUG
      • wakeUpNot

        private Class<?> wakeUpNot
      • schedule

        private boolean schedule
    • Constructor Detail

      • WakeUpTask

        public WakeUpTask​(AgentId id,
                          Class<?> wakeUpNotClass,
                          long period)
        Creates a new WakeUpTask and schedules it.
        Parameters:
        id - the id of the agent to wake up.
        wakeUpNotClass - the notification which will be sent to the agent
        period - period to wake up.
    • Method Detail

      • schedule

        private void schedule​(long period)
        Schedules the wake up task for execution after the given period.
        Parameters:
        period - Delay in ms before waking up.