Package org.red5.server.api.scheduling
Interface ISchedulingService
- All Superinterfaces:
IScopeService
- All Known Implementing Classes:
AdminApplication
,AntMediaApplicationAdapter
,ApplicationAdapter
,ApplicationSchedulingService
,MultiThreadedApplicationAdapter
,QuartzSchedulingService
Service that supports periodic execution of jobs, adding, removing and getting their name as list.
- Author:
- The Red5 Project, Joachim Bauch (jojo@struktur.de), Paul Gregoire (mondain@gmail.com)
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddScheduledJob
(int interval, IScheduledJob job) Schedule a job for periodic execution.addScheduledJobAfterDelay
(int interval, IScheduledJob job, int delay) Schedule a job for periodic execution which will start after the specifed delay.addScheduledOnceJob
(long timeDelta, IScheduledJob job) Schedule a job for single execution in the future.addScheduledOnceJob
(Date date, IScheduledJob job) Schedule a job for single execution at a given date.Return names of scheduled jobs.void
pauseScheduledJob
(String name) Pauses the trigger which initiates job execution.void
removeScheduledJob
(String name) Stop executing a previously scheduled job.void
resumeScheduledJob
(String name) Resumes the trigger which initiates job execution.
-
Field Details
-
BEAN_NAME
- See Also:
-
-
Method Details
-
addScheduledJob
Schedule a job for periodic execution.- Parameters:
interval
- time in milliseconds between two notifications of the jobjob
- the job to trigger periodically- Returns:
- the name of the scheduled job
-
addScheduledOnceJob
Schedule a job for single execution in the future. Please note that the jobs are not saved if Red5 is restarted in the meantime.- Parameters:
timeDelta
- time delta in milliseconds from the current datejob
- the job to trigger- Returns:
- the name of the scheduled job
-
addScheduledOnceJob
Schedule a job for single execution at a given date. Please note that the jobs are not saved if Red5 is restarted in the meantime.- Parameters:
date
- date when the job should be executedjob
- the job to trigger- Returns:
- the name of the scheduled job
-
addScheduledJobAfterDelay
Schedule a job for periodic execution which will start after the specifed delay.- Parameters:
interval
- time in milliseconds between two notifications of the jobjob
- the job to trigger periodicallydelay
- time in milliseconds to pass before first execution.- Returns:
- the name of the scheduled job
-
pauseScheduledJob
Pauses the trigger which initiates job execution.- Parameters:
name
- name of the job to stop
-
resumeScheduledJob
Resumes the trigger which initiates job execution.- Parameters:
name
- name of the job to stop
-
removeScheduledJob
Stop executing a previously scheduled job.- Parameters:
name
- name of the job to stop
-
getScheduledJobNames
Return names of scheduled jobs.- Returns:
- list of job names
-