|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.red5.server.scheduling.QuartzSchedulingService
@ManagedResource(objectName="org.red5.server:name=schedulingService,type=QuartzSchedulingService") public class QuartzSchedulingService
Scheduling service that uses Quartz as backend.
Field Summary | |
---|---|
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 |
Fields inherited from interface org.red5.server.api.scheduling.ISchedulingService |
---|
BEAN_NAME |
Constructor Summary | |
---|---|
QuartzSchedulingService()
|
Method Summary | |
---|---|
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected AtomicLong jobDetailCounter
protected org.quartz.SchedulerFactory factory
protected org.quartz.Scheduler scheduler
protected String instanceId
Constructor Detail |
---|
public QuartzSchedulingService()
Method Detail |
---|
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
public void setFactory(org.quartz.SchedulerFactory factory)
public void setInstanceId(String instanceId)
public String addScheduledJob(int interval, IScheduledJob job)
addScheduledJob
in interface ISchedulingService
interval
- time in milliseconds between two notifications of the jobjob
- the job to trigger periodically
public String addScheduledOnceJob(Date date, IScheduledJob job)
addScheduledOnceJob
in interface ISchedulingService
date
- date when the job should be executedjob
- the job to trigger
public String addScheduledOnceJob(long timeDelta, IScheduledJob job)
addScheduledOnceJob
in interface ISchedulingService
timeDelta
- time delta in milliseconds from the current datejob
- the job to trigger
public String addScheduledJobAfterDelay(int interval, IScheduledJob job, int delay)
addScheduledJobAfterDelay
in interface ISchedulingService
interval
- 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 QuartzSchedulingServiceMXBean
public List<String> getScheduledJobNames()
getScheduledJobNames
in interface ISchedulingService
getScheduledJobNames
in interface QuartzSchedulingServiceMXBean
public void pauseScheduledJob(String name)
pauseScheduledJob
in interface ISchedulingService
name
- name of the job to stoppublic void resumeScheduledJob(String name)
resumeScheduledJob
in interface ISchedulingService
name
- name of the job to stoppublic void pauseScheduledTrigger(String name)
public void resumeScheduledTrigger(String name)
public void removeScheduledJob(String name)
removeScheduledJob
in interface ISchedulingService
removeScheduledJob
in interface QuartzSchedulingServiceMXBean
name
- name of the job to stoppublic void destroy() throws Exception
destroy
in interface DisposableBean
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |