org.apache.turbine.services.schedule
Class TurbineScheduler

java.lang.Object
  extended by org.apache.turbine.services.schedule.TurbineScheduler

public abstract class TurbineScheduler
extends java.lang.Object

This is a fascade class to provide easy access to the Scheduler service. All access methods are static and act upon the current instance of the scheduler service.

Version:
$Id: TurbineScheduler.java 534527 2007-05-02 16:10:59Z tv $
Author:
Quinton McCombs
See Also:
ScheduleService

Constructor Summary
TurbineScheduler()
           
 
Method Summary
static void addJob(JobEntry je)
          Add a new job to the queue.
static JobEntry getJob(int oid)
          Get a specific Job from Storage.
static boolean isEnabled()
          Determines if the scheduler service is currently active.
static java.util.List listJobs()
          List jobs in the queue.
static void removeJob(JobEntry je)
          Remove a job from the queue.
static void startScheduler()
          Starts the scheduler if not already running.
static void stopScheduler()
          Stops the scheduler if ti is currently running.
static void updateJob(JobEntry je)
          Add or update a job
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TurbineScheduler

public TurbineScheduler()
Method Detail

getJob

public static JobEntry getJob(int oid)
                       throws TurbineException
Get a specific Job from Storage.

Parameters:
oid - The int id for the job.
Returns:
A JobEntry.
Throws:
TurbineException - job could not be retrieved

addJob

public static void addJob(JobEntry je)
                   throws TurbineException
Add a new job to the queue.

Parameters:
je - A JobEntry with the job to add.
Throws:
TurbineException - job could not be added

updateJob

public static void updateJob(JobEntry je)
                      throws TurbineException
Add or update a job

Parameters:
je - A JobEntry with the job to modify
Throws:
TurbineException - job could not be updated

removeJob

public static void removeJob(JobEntry je)
                      throws TurbineException
Remove a job from the queue.

Parameters:
je - A JobEntry with the job to remove.
Throws:
TurbineException - job could not be removed

listJobs

public static java.util.List listJobs()
List jobs in the queue. This is used by the scheduler UI.

Returns:
A Vector of jobs.

isEnabled

public static boolean isEnabled()
Determines if the scheduler service is currently active.

Returns:
Status of the scheduler service.

startScheduler

public static void startScheduler()
Starts the scheduler if not already running.


stopScheduler

public static void stopScheduler()
Stops the scheduler if ti is currently running.



Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.