org.media.mn8.util.cron
Class PeriodicTrigger

java.lang.Object
  |
  +--org.media.mn8.util.cron.PeriodicTrigger
All Implemented Interfaces:
Trigger

public class PeriodicTrigger
extends Object
implements Trigger


Field Summary
protected  long m_offset
           
protected  long m_period
           
 
Constructor Summary
PeriodicTrigger(long offset, long period)
           
 
Method Summary
 long getOffset()
           
 long getPeriod()
           
 long getTimeAfter(long time)
          Retrieve the next time at which this trigger activates.
 void reset()
          Reset the original TimeTrigger.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_offset

protected final long m_offset

m_period

protected final long m_period
Constructor Detail

PeriodicTrigger

public PeriodicTrigger(long offset,
                       long period)
Method Detail

getTimeAfter

public long getTimeAfter(long time)
Retrieve the next time at which this trigger activates.

Specified by:
getTimeAfter in interface Trigger
Returns:
the time at which the trigger will activate

getOffset

public long getOffset()

getPeriod

public long getPeriod()

reset

public void reset()
Reset the original TimeTrigger. This will recalculate the activation time for this trigger.

Specified by:
reset in interface Trigger

toString

public String toString()
Overrides:
toString in class Object


"Copyright © 2000-2002 Internet Multicasting Services, media.org & noLimits Technologies. All Rights Reserved."