agentland.util.scheduler
Class OneTimeReminder

java.lang.Object
  |
  +--agentland.util.scheduler.ReminderRecord
        |
        +--agentland.util.scheduler.OneTimeReminder
All Implemented Interfaces:
Comparable, Serializable

public class OneTimeReminder
extends ReminderRecord

See Also:
Serialized Form

Field Summary
protected  long wTime
           
 
Fields inherited from class agentland.util.scheduler.ReminderRecord
aid, expiresAfter, id, message, method, NEVER, wakeup
 
Constructor Summary
OneTimeReminder(AgentID aid, String method, Serializable message, int wTime, String unit)
          Using this constructor you can request relative wake up time (e.g.
OneTimeReminder(AgentID aid, String method, Serializable message, long wTime)
           
OneTimeReminder(AgentID aid, String method, Serializable message, long wTime, boolean wakeup)
           
 
Method Summary
 long nextActivation()
           
 void reminderIssued(long wTime)
          After reminding an agent, you should notify the ReminderRecord about it (so that it knows reminder has been issued and is not past due)
 String toString()
           
 
Methods inherited from class agentland.util.scheduler.ReminderRecord
compareTo, dead, futureTime, getAgentID, getExpiresAfter, getID, getMessage, getMethodName, getWakeup, setExpiresAfter, setID, timeFromNow, timeInMillis
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

wTime

protected long wTime
Constructor Detail

OneTimeReminder

public OneTimeReminder(AgentID aid,
                       String method,
                       Serializable message,
                       long wTime)

OneTimeReminder

public OneTimeReminder(AgentID aid,
                       String method,
                       Serializable message,
                       long wTime,
                       boolean wakeup)

OneTimeReminder

public OneTimeReminder(AgentID aid,
                       String method,
                       Serializable message,
                       int wTime,
                       String unit)
Using this constructor you can request relative wake up time (e.g. in 10 minutes, 2 hours, 5 days)
Parameters:
unit - "sec", "min", "hours", or "days"
Method Detail

nextActivation

public long nextActivation()
Overrides:
nextActivation in class ReminderRecord

reminderIssued

public void reminderIssued(long wTime)
Description copied from class: ReminderRecord
After reminding an agent, you should notify the ReminderRecord about it (so that it knows reminder has been issued and is not past due)
Overrides:
reminderIssued in class ReminderRecord

toString

public String toString()
Overrides:
toString in class ReminderRecord