fr.dyade.aaa.agent
Class WakeUpTask
java.lang.Object
java.util.TimerTask
fr.dyade.aaa.agent.WakeUpTask
- All Implemented Interfaces:
- java.lang.Runnable
public class WakeUpTask
- extends java.util.TimerTask
Class used to schedule a wake up on a specific agent. A notification is sent
to activate the agent.
Constructor Summary |
WakeUpTask(AgentId id,
java.lang.Class wakeUpNotClass,
long period)
Creates a new WakeUpTask and schedules it. |
Method Summary |
void |
run()
|
private void |
schedule(long period)
Schedules the wake up task for execution after the given period. |
Methods inherited from class java.util.TimerTask |
cancel, scheduledExecutionTime |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
private static final org.objectweb.util.monolog.api.Logger logger
destId
private AgentId destId
wakeUpNot
private java.lang.Class wakeUpNot
schedule
private boolean schedule
WakeUpTask
public WakeUpTask(AgentId id,
java.lang.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 agentperiod
- period to wake up.
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
- Specified by:
run
in class java.util.TimerTask
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.
Copyright © 2010 ScalAgent D.T.. All Rights Reserved.