BEAST
eu.baltrad.beast.scheduler.BeastScheduler Class Reference

The scheduler within beast. More...

Inheritance diagram for eu.baltrad.beast.scheduler.BeastScheduler:
eu.baltrad.beast.scheduler.IBeastScheduler

Public Member Functions

 BeastScheduler ()
 Constructor.
 
synchronized void setSchedulerFactoryBean (SchedulerFactoryBean sf)
 Sets the scheduler factory bean.
 
void setMessageManager (IBltMessageManager mgr)
 
void setJdbcTemplate (JdbcOperations template)
 
synchronized void afterPropertiesSet () throws Exception
 
synchronized void destroy () throws Exception
 
int register (String expression, String name)
 
void reregister (int id, String expression, String name)
 
void unregister (int id)
 
List< CronEntrygetSchedule ()
 
List< CronEntrygetSchedule (String job)
 
CronEntry getEntry (int id)
 

Static Public Member Functions

static void main (String[] args)
 

Protected Member Functions

SchedulerFactoryBean createScheduleFactory ()
 Creates a SchedulerFactoryBean.
 
CronTrigger createTrigger (CronEntry entry, JobDetail jobDetail)
 Creates the cron trigger.
 
void scheduleJob (CronEntry entry)
 
void rescheduleJob (int id, CronEntry entry)
 Reschedules the job.
 
JobDetail registerJob (String jobName) throws org.quartz.SchedulerException
 Creates a job detail.
 
CronEntry createCronEntry (String expression, String name)
 Returns a new instance of cron entry.
 
NamedParameterJdbcTemplate getNamedParameterTemplate ()
 
BeanPropertySqlParameterSource getParameterSource (CronEntry entry)
 Creates a parameter source from an entry.
 
GeneratedKeyHolder createKeyHolder ()
 
JobDetailFactoryBean createJob (String jobName)
 Creates a job detail bean.
 
RowMapper< CronEntrygetScheduleMapper ()
 
CronEntry doMapRow (ResultSet rs, int rownum) throws SQLException
 Maps one resultset into a cron entry.
 

Detailed Description

The scheduler within beast.

The scheduler works like any other IBltMessage producer and sends BltScheduledJobMessage's. This means that in order to handle scheduled jobs the appropriate rule must be supporting this.

You ought to specify jobName (rule name) in order to get the correct rule executed instead of the ordinary broadcast but that is up to you.

Author
Anders Henja

Constructor & Destructor Documentation

◆ BeastScheduler()

eu.baltrad.beast.scheduler.BeastScheduler.BeastScheduler ( )
inline

Constructor.

Member Function Documentation

◆ afterPropertiesSet()

synchronized void eu.baltrad.beast.scheduler.BeastScheduler.afterPropertiesSet ( ) throws Exception
inline
See also
org.springframework.beans.factory.InitializingBean.afterPropertiesSet()

◆ createCronEntry()

CronEntry eu.baltrad.beast.scheduler.BeastScheduler.createCronEntry ( String expression,
String name )
inlineprotected

Returns a new instance of cron entry.

Parameters
expressionthe cron expression
namethe name
Returns
the instance

◆ createJob()

JobDetailFactoryBean eu.baltrad.beast.scheduler.BeastScheduler.createJob ( String jobName)
inlineprotected

Creates a job detail bean.

Parameters
jobNamethe job name
Returns
the bean

◆ createKeyHolder()

GeneratedKeyHolder eu.baltrad.beast.scheduler.BeastScheduler.createKeyHolder ( )
inlineprotected
Returns
the key holder

◆ createScheduleFactory()

SchedulerFactoryBean eu.baltrad.beast.scheduler.BeastScheduler.createScheduleFactory ( )
inlineprotected

Creates a SchedulerFactoryBean.

Remember to call afterPropertiesSet on it.

Returns
the scheduler factory bean

◆ createTrigger()

CronTrigger eu.baltrad.beast.scheduler.BeastScheduler.createTrigger ( CronEntry entry,
JobDetail jobDetail )
inlineprotected

Creates the cron trigger.

Parameters
entrythe entry to create a cron trigger from
Returns
a cron trigger

◆ destroy()

synchronized void eu.baltrad.beast.scheduler.BeastScheduler.destroy ( ) throws Exception
inline
See also
org.springframework.beans.factory.DisposableBean.destroy()

◆ doMapRow()

CronEntry eu.baltrad.beast.scheduler.BeastScheduler.doMapRow ( ResultSet rs,
int rownum ) throws SQLException
inlineprotected

Maps one resultset into a cron entry.

Parameters
rsthe result set
rownumthe row number
Returns
the cron entry
Exceptions
SQLExceptionon error

◆ getEntry()

CronEntry eu.baltrad.beast.scheduler.BeastScheduler.getEntry ( int id)
inline

◆ getNamedParameterTemplate()

NamedParameterJdbcTemplate eu.baltrad.beast.scheduler.BeastScheduler.getNamedParameterTemplate ( )
inlineprotected
Returns
the named parameter template

◆ getParameterSource()

BeanPropertySqlParameterSource eu.baltrad.beast.scheduler.BeastScheduler.getParameterSource ( CronEntry entry)
inlineprotected

Creates a parameter source from an entry.

Parameters
entrythe entry
Returns
the parameter source

◆ getSchedule() [1/2]

List< CronEntry > eu.baltrad.beast.scheduler.BeastScheduler.getSchedule ( )
inline

◆ getSchedule() [2/2]

List< CronEntry > eu.baltrad.beast.scheduler.BeastScheduler.getSchedule ( String job)
inline

◆ getScheduleMapper()

RowMapper< CronEntry > eu.baltrad.beast.scheduler.BeastScheduler.getScheduleMapper ( )
inlineprotected
Returns
the schedule mapper to use

◆ register()

int eu.baltrad.beast.scheduler.BeastScheduler.register ( String expression,
String name )
inline

◆ registerJob()

JobDetail eu.baltrad.beast.scheduler.BeastScheduler.registerJob ( String jobName) throws org.quartz.SchedulerException
inlineprotected

Creates a job detail.

Parameters
jobNamethe beast job name
Exceptions
SchedulerException

◆ reregister()

void eu.baltrad.beast.scheduler.BeastScheduler.reregister ( int id,
String expression,
String name )
inline
See also
eu.baltrad.beast.scheduler.IBeastScheduler.reregister(int, java.lang.String, java.lang.String)

Implements eu.baltrad.beast.scheduler.IBeastScheduler.

◆ rescheduleJob()

void eu.baltrad.beast.scheduler.BeastScheduler.rescheduleJob ( int id,
CronEntry entry )
inlineprotected

Reschedules the job.

Parameters
idthe id of the trigger to be rescheduled
entrythe job
Exceptions
SchedulerException

◆ setJdbcTemplate()

void eu.baltrad.beast.scheduler.BeastScheduler.setJdbcTemplate ( JdbcOperations template)
inline
Parameters
templatethe template

◆ setMessageManager()

void eu.baltrad.beast.scheduler.BeastScheduler.setMessageManager ( IBltMessageManager mgr)
inline
Parameters
mgrthe message manager to set

◆ setSchedulerFactoryBean()

synchronized void eu.baltrad.beast.scheduler.BeastScheduler.setSchedulerFactoryBean ( SchedulerFactoryBean sf)
inline

Sets the scheduler factory bean.

Parameters
sfthe factory bean

◆ unregister()

void eu.baltrad.beast.scheduler.BeastScheduler.unregister ( int id)
inline

The documentation for this class was generated from the following file: