org.figure8.join.services.scheduling
Interface QuartzCronManager

All Known Implementing Classes:
DefaultQuartzCronManager

public interface QuartzCronManager

This is the interface defintion of the manager of QuartzCronInfo and QuartzCronParameterInfo entities.

Version:
$Revision: 1.3 $
Author:
Jerome Evrard

Field Summary
static java.lang.String JOB_ENTITY
          Constant allowing to identify the entity object to whom the job applies.
 
Method Summary
 QuartzCronInfo getQuartzCron(java.lang.String name)
          Retrieve a QuartzCronInfo instance using its name.
 java.util.List getQuartzCronInfos()
          Retrieve all QuartzCronInfo instances.
 void removeQuartzCronInfo(QuartzCronInfo info)
          Remove a Quartz Cron infos from datastore.
 void saveQuartzCronInfo(QuartzCronInfo info)
          Save a QuartzCronInfo within datastore.
 void scheduleJobs()
          Start scheduling of all the already saved Quartz jobs.
 void unscheduleJobs()
          Stop the scheduling of all the registered Quartz jobs.
 

Field Detail

JOB_ENTITY

static final java.lang.String JOB_ENTITY
Constant allowing to identify the entity object to whom the job applies. Tipically, it is used as a kay of the job detail data when job is launched.

See Also:
Constant Field Values
Method Detail

saveQuartzCronInfo

void saveQuartzCronInfo(QuartzCronInfo info)
                        throws DuplicateEntityException,
                               InfrastructureException
Save a QuartzCronInfo within datastore. This method is also responsible of cron activation/deactivation if necessary (depends on its status).

Parameters:
info - The QuartzCronInfo instance to save.
Throws:
DuplicateEntityException - if another consumer with same name already exists.
InfrastructureException - if wrapped Quartz scheduler cannot schedule the job

removeQuartzCronInfo

void removeQuartzCronInfo(QuartzCronInfo info)
Remove a Quartz Cron infos from datastore. This method should also stop existing scheduled instances before removing the related informations.

Parameters:
info - The info on a Quartz cron to remove

getQuartzCron

QuartzCronInfo getQuartzCron(java.lang.String name)
Retrieve a QuartzCronInfo instance using its name.

Parameters:
name - The QuartzCronInfo name to retrieve.
Returns:
The QuartzCronInfo instance found or null if not exists.

getQuartzCronInfos

java.util.List getQuartzCronInfos()
Retrieve all QuartzCronInfo instances.

Returns:
The list of QuartzCronInfo in data source.

scheduleJobs

void scheduleJobs()
                  throws InfrastructureException
Start scheduling of all the already saved Quartz jobs. This method should be called on startup.

Throws:
InfrastructureException - if wrapped Quartz scheduler cannot schedule the jobs

unscheduleJobs

void unscheduleJobs()
Stop the scheduling of all the registered Quartz jobs. This method should be clled on shutdown.



Copyright © 2005-2008 Join. All Rights Reserved.