com.caucho.config.timer
Class Scheduler

java.lang.Object
  extended by com.caucho.config.timer.Scheduler

public class Scheduler
extends java.lang.Object

Resin scheduler.

Author:
Reza Rahman

Field Summary
protected static java.util.logging.Logger log
           
 
Constructor Summary
Scheduler()
           
 
Method Summary
static void addTimerTask(TimerTask task)
          Adds a scheduled task.
static TimerTask getTimerTaskById(long taskId)
          Gets the scheduled task for a given task ID.
static java.util.Collection<TimerTask> getTimerTasksByTargetBean(java.lang.Class targetBean)
          Gets the scheduled tasks for a given target bean.
static void removeTimerTask(TimerTask scheduledTask)
          Removes a scheduled task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final java.util.logging.Logger log
Constructor Detail

Scheduler

public Scheduler()
Method Detail

addTimerTask

public static void addTimerTask(TimerTask task)
Adds a scheduled task.

Parameters:
task - The task to add.

getTimerTaskById

public static TimerTask getTimerTaskById(long taskId)
Gets the scheduled task for a given task ID.

Parameters:
taskId - The ID of the task to match.
Returns:
The matching scheduled task, null if one is not found.

getTimerTasksByTargetBean

public static java.util.Collection<TimerTask> getTimerTasksByTargetBean(java.lang.Class targetBean)
Gets the scheduled tasks for a given target bean.

Parameters:
targetBean - The target bean to match.
Returns:
The scheduled tasks for the target bean.

removeTimerTask

public static void removeTimerTask(TimerTask scheduledTask)
Removes a scheduled task.

Parameters:
scheduledTask - The scheduled task to remove.