public class JobSchedulerFacade extends java.lang.Object implements JobScheduler
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(JobListener l)
Add a Job listener
|
java.util.List<Job> |
getAllJobs()
Get all the outstanding Jobs
|
java.util.List<Job> |
getAllJobs(long start,
long finish)
Get all outstanding jobs due to run between start and finish
|
java.lang.String |
getName() |
java.util.List<Job> |
getNextScheduleJobs()
Get all the jobs scheduled to run next
|
long |
getNextScheduleTime()
Get the next time jobs will be fired
|
void |
remove(long time)
remove all jobs scheduled to run at this time
|
void |
remove(java.lang.String jobId)
remove a job with the matching jobId
|
void |
removeAllJobs()
remove all the Jobs from the scheduler
|
void |
removeAllJobs(long start,
long finish)
remove all the Jobs from the scheduler that are due between the start and finish times
|
void |
removeListener(JobListener l)
remove a JobListener
|
void |
schedule(java.lang.String jobId,
ByteSequence payload,
long delay)
Add a job to be scheduled
|
void |
schedule(java.lang.String jobId,
ByteSequence payload,
java.lang.String cronEntry)
Add a job to be scheduled
|
void |
schedule(java.lang.String jobId,
ByteSequence payload,
java.lang.String cronEntry,
long start,
long period,
int repeat)
Add a job to be scheduled
|
public void addListener(JobListener l) throws java.lang.Exception
JobScheduleraddListener in interface JobSchedulerjava.lang.Exceptionpublic java.util.List<Job> getAllJobs() throws java.lang.Exception
JobSchedulergetAllJobs in interface JobSchedulerjava.lang.Exceptionpublic java.util.List<Job> getAllJobs(long start, long finish) throws java.lang.Exception
JobSchedulergetAllJobs in interface JobSchedulerjava.lang.Exceptionpublic java.lang.String getName()
throws java.lang.Exception
getName in interface JobSchedulerjava.lang.Exceptionpublic java.util.List<Job> getNextScheduleJobs() throws java.lang.Exception
JobSchedulergetNextScheduleJobs in interface JobSchedulerjava.lang.Exceptionpublic long getNextScheduleTime()
throws java.lang.Exception
JobSchedulergetNextScheduleTime in interface JobSchedulerjava.lang.Exceptionpublic void remove(long time)
throws java.lang.Exception
JobSchedulerremove in interface JobSchedulerjava.lang.Exceptionpublic void remove(java.lang.String jobId)
throws java.lang.Exception
JobSchedulerremove in interface JobSchedulerjava.lang.Exceptionpublic void removeAllJobs()
throws java.lang.Exception
JobSchedulerremoveAllJobs in interface JobSchedulerjava.lang.Exceptionpublic void removeAllJobs(long start,
long finish)
throws java.lang.Exception
JobSchedulerremoveAllJobs in interface JobSchedulerstart - time in millisecondsfinish - time in millisecondsjava.lang.Exceptionpublic void removeListener(JobListener l) throws java.lang.Exception
JobSchedulerremoveListener in interface JobSchedulerjava.lang.Exceptionpublic void schedule(java.lang.String jobId,
ByteSequence payload,
long delay)
throws java.lang.Exception
JobSchedulerschedule in interface JobSchedulerjobId - a unique identifier for the jobpayload - the message to be sent when the job is scheduleddelay - the time in milliseconds before the job will be runjava.lang.Exceptionpublic void schedule(java.lang.String jobId,
ByteSequence payload,
java.lang.String cronEntry,
long start,
long period,
int repeat)
throws java.lang.Exception
JobSchedulerschedule in interface JobSchedulerjobId - a unique identifier for the jobpayload - the message to be sent when the job is scheduledcronEntry - - cron entrystart - time in ms to wait before schedulingperiod - the time in milliseconds between successive executions of the Jobrepeat - the number of times to execute the job - less than 0 will be repeated foreverjava.lang.Exceptionpublic void schedule(java.lang.String jobId,
ByteSequence payload,
java.lang.String cronEntry)
throws java.lang.Exception
JobSchedulerschedule in interface JobSchedulerjobId - a unique identifier for the jobpayload - the message to be sent when the job is scheduledcronEntry - - cron entryjava.lang.ExceptionCopyright © 2005-2013 Red Hat, Inc.. All Rights Reserved.