org.apache.turbine.services.schedule
Interface ScheduleService

All Superinterfaces:
Initable, Service
All Known Implementing Classes:
TurbineSchedulerService

public interface ScheduleService
extends Service

ScheduleService interface.

Version:
$Id: ScheduleService.java 534527 2007-05-02 16:10:59Z tv $
Author:
Dave Bryson, Quinton McCombs

Field Summary
static java.lang.String INTIALLY_ACTIVE
          TR.props key for intially activating the scheduler thread
static java.lang.String LOGGER_NAME
          TR.props key for the logger
static java.lang.String SERVICE_NAME
          Name of service
 
Method Summary
 void addJob(JobEntry je)
          Add a new job to the queue.
 JobEntry getJob(int oid)
          Get a specific Job from Storage.
 boolean isEnabled()
          Determines if the scheduler service is currently active.
 java.util.List listJobs()
          List jobs in the queue.
 void removeJob(JobEntry je)
          Remove a job from the queue.
 void startScheduler()
          Starts the scheduler if not already running.
 void stopScheduler()
          Stops the scheduler if ti is currently running.
 void updateJob(JobEntry je)
          Modify a Job.
 
Methods inherited from interface org.apache.turbine.services.Service
getConfiguration, getName, getProperties, setName, setServiceBroker
 
Methods inherited from interface org.apache.turbine.services.Initable
getInit, init, init, setInitableBroker, shutdown
 

Field Detail

SERVICE_NAME

public static final java.lang.String SERVICE_NAME
Name of service

See Also:
Constant Field Values

INTIALLY_ACTIVE

public static final java.lang.String INTIALLY_ACTIVE
TR.props key for intially activating the scheduler thread

See Also:
Constant Field Values

LOGGER_NAME

public static final java.lang.String LOGGER_NAME
TR.props key for the logger

See Also:
Constant Field Values
Method Detail

getJob

public 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 - could not retreive job

addJob

public 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 void updateJob(JobEntry je)
               throws TurbineException
Modify a Job.

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

removeJob

public 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 java.util.List listJobs()
List jobs in the queue. This is used by the scheduler UI.

Returns:
A List of jobs.

isEnabled

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

Returns:
Status of the scheduler service.

startScheduler

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


stopScheduler

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



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