org.apache.avalon.cornerstone.services.scheduler
Interface TimeScheduler

All Known Implementing Classes:
DefaultTimeScheduler

public interface TimeScheduler

This service provides a way to regularly schedule jobs.

Author:
Avalon Development Team

Field Summary
static java.lang.String ROLE
           
 
Method Summary
 void addTrigger(java.lang.String name, TimeTrigger trigger, Target target)
          Schedule a time based trigger.
 void addTriggerFailureListener(TriggerFailureListener listener)
          Add a trigger failure listener
 void removeTrigger(java.lang.String name)
          Remove a scheduled trigger by name.
 void removeTriggerFailureListener(TriggerFailureListener listener)
          Remove a trigger failure listener
 void resetTrigger(java.lang.String name)
          Force a trigger time to be recalculated.
 

Field Detail

ROLE

public static final java.lang.String ROLE
Method Detail

addTrigger

public void addTrigger(java.lang.String name,
                       TimeTrigger trigger,
                       Target target)
Schedule a time based trigger. Note that if a TimeTrigger 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

addTriggerFailureListener

public void addTriggerFailureListener(TriggerFailureListener listener)
Add a trigger failure listener

Parameters:
listener - the listener

removeTriggerFailureListener

public void removeTriggerFailureListener(TriggerFailureListener listener)
Remove a trigger failure listener

Parameters:
listener - the listener


Copyright © 1997-2005 The Apache Software Foundation. All Rights Reserved.