org.apache.activemq.broker.scheduler
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
JobScheduler
addListener
in interface JobScheduler
java.lang.Exception
public java.util.List<Job> getAllJobs() throws java.lang.Exception
JobScheduler
getAllJobs
in interface JobScheduler
java.lang.Exception
public java.util.List<Job> getAllJobs(long start, long finish) throws java.lang.Exception
JobScheduler
getAllJobs
in interface JobScheduler
java.lang.Exception
public java.lang.String getName() throws java.lang.Exception
getName
in interface JobScheduler
java.lang.Exception
public java.util.List<Job> getNextScheduleJobs() throws java.lang.Exception
JobScheduler
getNextScheduleJobs
in interface JobScheduler
java.lang.Exception
public long getNextScheduleTime() throws java.lang.Exception
JobScheduler
getNextScheduleTime
in interface JobScheduler
java.lang.Exception
public void remove(long time) throws java.lang.Exception
JobScheduler
remove
in interface JobScheduler
java.lang.Exception
public void remove(java.lang.String jobId) throws java.lang.Exception
JobScheduler
remove
in interface JobScheduler
java.lang.Exception
public void removeAllJobs() throws java.lang.Exception
JobScheduler
removeAllJobs
in interface JobScheduler
java.lang.Exception
public void removeAllJobs(long start, long finish) throws java.lang.Exception
JobScheduler
removeAllJobs
in interface JobScheduler
start
- time in millisecondsfinish
- time in millisecondsjava.lang.Exception
public void removeListener(JobListener l) throws java.lang.Exception
JobScheduler
removeListener
in interface JobScheduler
java.lang.Exception
public void schedule(java.lang.String jobId, ByteSequence payload, long delay) throws java.lang.Exception
JobScheduler
schedule
in interface JobScheduler
jobId
- 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.Exception
public void schedule(java.lang.String jobId, ByteSequence payload, java.lang.String cronEntry, long start, long period, int repeat) throws java.lang.Exception
JobScheduler
schedule
in interface JobScheduler
jobId
- 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.Exception
public void schedule(java.lang.String jobId, ByteSequence payload, java.lang.String cronEntry) throws java.lang.Exception
JobScheduler
schedule
in interface JobScheduler
jobId
- a unique identifier for the jobpayload
- the message to be sent when the job is scheduledcronEntry
- - cron entryjava.lang.Exception
Copyright © 2005-2014. All Rights Reserved.