org.media.mn8.util
Class CronTimeScheduler

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

public class CronTimeScheduler
extends java.lang.Object
implements java.lang.Runnable

CronTimeScheduler, waiting for the crons and runs the Entries.

Author:
Antal Attila

Constructor Summary
CronTimeScheduler()
           
 
Method Summary
 void addTrigger(java.lang.String name, Cron trigger, java.lang.String target)
          Schedule a time based trigger.
 org.media.mn8.util.CronScheduledEntry getEntry(java.lang.String name)
          Retrieve entry from set.
 void removeTrigger(java.lang.String name)
          Remove a scheduled trigger by name.
 void resetTrigger(java.lang.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

CronTimeScheduler

public CronTimeScheduler()
Method Detail

addTrigger

public void addTrigger(java.lang.String name,
                       Cron trigger,
                       java.lang.String target)
                throws java.lang.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

removeTrigger

public void removeTrigger(java.lang.String name)
                   throws java.util.NoSuchElementException
Remove a scheduled trigger by name.
Parameters:
name - the name of the trigger
Throws:
java.util.NoSuchElementException - if no trigger exists with that name

resetTrigger

public void resetTrigger(java.lang.String name)
                  throws java.util.NoSuchElementException
Force a trigger time to be recalculated.
Parameters:
name - the name of the trigger
Throws:
java.util.NoSuchElementException - if no trigger exists with that name

getEntry

public org.media.mn8.util.CronScheduledEntry getEntry(java.lang.String name)
                                               throws java.util.NoSuchElementException
Retrieve entry from set.
Parameters:
name - the name of entry
Returns:
the entry
Throws:
java.util.NoSuchElementException - if no entry is found with that name

start

public void start()
           throws java.lang.Exception

stop

public void stop()

run

public void run()
Specified by:
run in interface java.lang.Runnable


"Copyright © 2001 Internet Multicasting Services & media.org. All Rights Reserved."