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