fr.dyade.aaa.agent
Class WakeUpTask

java.lang.Object
  extended by java.util.TimerTask
      extended by 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.


Field Summary
private  AgentId destId
           
private static org.objectweb.util.monolog.api.Logger logger
           
private  boolean schedule
           
private  java.lang.Class wakeUpNot
           
 
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
 

Field Detail

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
Constructor Detail

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 agent
period - period to wake up.
Method Detail

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.