org.media.mn8.util.cron
Class TimeScheduler

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

public class TimeScheduler
extends Object
implements Runnable

TimeScheduler, waiting for the crons and runs the Entries.

Author:
Antal Attila

Constructor Summary
TimeScheduler()
           
 
Method Summary
 void addTrigger(String name, Trigger trigger, String target)
          Schedule a time based trigger.
 void addTrigger(String name, Trigger trigger, String target, SeriesConcept params)
           
 org.media.mn8.util.cron.CronScheduledEntry getEntry(String name)
          Retrieve entry from set.
 void removeTrigger(String name)
          Remove a scheduled trigger by name.
 void resetTrigger(String name)
          Force a trigger time to be recalculated.
 void run()
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeScheduler

public TimeScheduler()
Method Detail

addTrigger

public void addTrigger(String name,
                       Trigger trigger,
                       String target)
                throws Exception
Schedule a time based trigger. Note that if a trigger already has same name then it is removed.

Parameters:
name - the name of the trigger
trigger - the trigger
target - the target
Exception

addTrigger

public void addTrigger(String name,
                       Trigger trigger,
                       String target,
                       SeriesConcept params)
                throws Exception
Exception

removeTrigger

public void removeTrigger(String name)
                   throws NoSuchElementException
Remove a scheduled trigger by name.

Parameters:
name - the name of the trigger
Throws:
NoSuchElementException - if no trigger exists with that name

resetTrigger

public void resetTrigger(String name)
                  throws NoSuchElementException
Force a trigger time to be recalculated.

Parameters:
name - the name of the trigger
Throws:
NoSuchElementException - if no trigger exists with that name

getEntry

public org.media.mn8.util.cron.CronScheduledEntry getEntry(String name)
                                                    throws NoSuchElementException
Retrieve entry from set.

Parameters:
name - the name of entry
Returns:
the entry
Throws:
NoSuchElementException - if no entry is found with that name

start

public void start()
           throws Exception
Exception

stop

public void stop()

run

public void run()
Specified by:
run in interface Runnable


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