org.jboss.soa.esb.schedule
Class SchedulerJob

java.lang.Object
  extended by org.jboss.soa.esb.schedule.SchedulerJob

public class SchedulerJob
extends java.lang.Object

Scheduler job tied to the lifecycle.


Nested Class Summary
static class SchedulerJob.ESBScheduledJob
          The scheduled job for executing the listener.
 
Method Summary
static SchedulerJob createCronSchedulerJob(java.lang.String name, SchedulerJobListener listener, java.lang.String cronExpression, java.util.Date startDate, java.util.Date endDate, java.util.Properties properties)
          Create a job based on cron.
static SchedulerJob createIntervalSchedulerJob(java.lang.String name, SchedulerJobListener listener, long interval, java.util.Date startDate, java.util.Date endDate, java.util.Properties properties)
          Create a job based on an interval.
static SchedulerJob createIntervalSchedulerJob(java.lang.String name, SchedulerJobListener listener, long interval, int execCount, java.util.Date startDate, java.util.Date endDate, java.util.Properties properties)
          Create a job based on an interval.
static SchedulerJob createIntervalSchedulerJob(java.lang.String name, SchedulerJobListener listener, long interval, java.util.Properties properties)
          Create a job based on an interval.
 void destroy()
          Destroy the trigger.
 void pause()
          Pause the operation of the trigger.
 void start()
          Start or resume the operation of the trigger.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

start

public void start()
           throws SchedulingException
Start or resume the operation of the trigger.

Throws:
SchedulingException - for errors during the operation.

pause

public void pause()
           throws SchedulingException
Pause the operation of the trigger.

Throws:
SchedulingException - for errors during the operation.

destroy

public void destroy()
             throws SchedulingException
Destroy the trigger.

Throws:
SchedulingException - for errors during the operation.

createIntervalSchedulerJob

public static SchedulerJob createIntervalSchedulerJob(java.lang.String name,
                                                      SchedulerJobListener listener,
                                                      long interval,
                                                      java.util.Properties properties)
Create a job based on an interval.

Parameters:
name - The name for the job.
listener - The listener to fire on schedule.
interval - The specified interval.
properties - Any scheduler properties that may be required.
Returns:
The Scheduler Job managing the schedule.

createIntervalSchedulerJob

public static SchedulerJob createIntervalSchedulerJob(java.lang.String name,
                                                      SchedulerJobListener listener,
                                                      long interval,
                                                      java.util.Date startDate,
                                                      java.util.Date endDate,
                                                      java.util.Properties properties)
Create a job based on an interval.

Parameters:
name - The name for the job.
listener - The listener to fire on schedule.
interval - The specified interval.
startDate - The start date of the trigger or null if not constrained.
endDate - The end date of the trigger or null if not constrained.
properties - Any scheduler properties that may be required.
Returns:
The Scheduler Job managing the schedule.

createIntervalSchedulerJob

public static SchedulerJob createIntervalSchedulerJob(java.lang.String name,
                                                      SchedulerJobListener listener,
                                                      long interval,
                                                      int execCount,
                                                      java.util.Date startDate,
                                                      java.util.Date endDate,
                                                      java.util.Properties properties)
Create a job based on an interval.

Parameters:
name - The name for the job.
listener - The listener to fire on schedule.
interval - The specified interval. #param execCount The execution count.
startDate - The start date of the trigger or null if not constrained.
endDate - The end date of the trigger or null if not constrained.
properties - Any scheduler properties that may be required.
Returns:
The Scheduler Job managing the schedule.

createCronSchedulerJob

public static SchedulerJob createCronSchedulerJob(java.lang.String name,
                                                  SchedulerJobListener listener,
                                                  java.lang.String cronExpression,
                                                  java.util.Date startDate,
                                                  java.util.Date endDate,
                                                  java.util.Properties properties)
                                           throws java.text.ParseException
Create a job based on cron.

Parameters:
name - The name for the job.
listener - The listener to fire on schedule.
cronExpression - The cron expression.
startDate - The start date of the trigger or null if not constrained.
endDate - The end date of the trigger or null if not constrained.
properties - Any scheduler properties that may be required.
Returns:
The Scheduler Job managing the schedule.
Throws:
java.text.ParseException - for errors in the cron expression.