@ManagedResource(objectName="org.red5.server:name=schedulingService,type=QuartzSchedulingService") public class QuartzSchedulingService extends Object implements ISchedulingService, QuartzSchedulingServiceMXBean, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
| Modifier and Type | Field and Description |
|---|---|
protected org.quartz.SchedulerFactory |
factory
Creates schedulers.
|
protected String |
instanceId
Instance id
|
protected AtomicLong |
jobDetailCounter
Number of job details
|
protected org.quartz.Scheduler |
scheduler
Service scheduler
|
BEAN_NAME| Constructor and Description |
|---|
QuartzSchedulingService() |
| Modifier and Type | Method and Description |
|---|---|
String |
addScheduledJob(int interval,
IScheduledJob job)
Schedule a job for periodic execution.
|
String |
addScheduledJobAfterDelay(int interval,
IScheduledJob job,
int delay)
Schedule a job for periodic execution which will start after the specifed delay.
|
String |
addScheduledOnceJob(Date date,
IScheduledJob job)
Schedule a job for single execution at a given date.
|
String |
addScheduledOnceJob(long timeDelta,
IScheduledJob job)
Schedule a job for single execution in the future.
|
void |
afterPropertiesSet()
Constructs a new QuartzSchedulingService.
|
void |
destroy() |
String |
getJobName()
Getter for job name.
|
List<String> |
getScheduledJobNames()
Return names of scheduled jobs.
|
void |
pauseScheduledJob(String name)
Pauses the trigger which initiates job execution.
|
void |
pauseScheduledTrigger(String name) |
void |
removeScheduledJob(String name)
Stop executing a previously scheduled job.
|
void |
resumeScheduledJob(String name)
Resumes the trigger which initiates job execution.
|
void |
resumeScheduledTrigger(String name) |
void |
setFactory(org.quartz.SchedulerFactory factory) |
void |
setInstanceId(String instanceId) |
protected AtomicLong jobDetailCounter
protected org.quartz.SchedulerFactory factory
protected org.quartz.Scheduler scheduler
protected String instanceId
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanExceptionpublic void setFactory(org.quartz.SchedulerFactory factory)
public void setInstanceId(String instanceId)
public String addScheduledJob(int interval, IScheduledJob job)
addScheduledJob in interface ISchedulingServiceinterval - time in milliseconds between two notifications of the jobjob - the job to trigger periodicallypublic String addScheduledOnceJob(Date date, IScheduledJob job)
addScheduledOnceJob in interface ISchedulingServicedate - date when the job should be executedjob - the job to triggerpublic String addScheduledOnceJob(long timeDelta, IScheduledJob job)
addScheduledOnceJob in interface ISchedulingServicetimeDelta - time delta in milliseconds from the current datejob - the job to triggerpublic String addScheduledJobAfterDelay(int interval, IScheduledJob job, int delay)
addScheduledJobAfterDelay in interface ISchedulingServiceinterval - time in milliseconds between two notifications of the jobjob - the job to trigger periodicallydelay - time in milliseconds to pass before first execution.public String getJobName()
getJobName in interface QuartzSchedulingServiceMXBeanpublic List<String> getScheduledJobNames()
getScheduledJobNames in interface ISchedulingServicegetScheduledJobNames in interface QuartzSchedulingServiceMXBeanpublic void pauseScheduledJob(String name)
pauseScheduledJob in interface ISchedulingServicename - name of the job to stoppublic void resumeScheduledJob(String name)
resumeScheduledJob in interface ISchedulingServicename - name of the job to stoppublic void pauseScheduledTrigger(String name)
public void resumeScheduledTrigger(String name)
public void removeScheduledJob(String name)
removeScheduledJob in interface ISchedulingServiceremoveScheduledJob in interface QuartzSchedulingServiceMXBeanname - name of the job to stopCopyright © 2006-2012 The Red5 Project