Interface ISchedulingService

All Superinterfaces:
IScopeService
All Known Implementing Classes:
AdminApplication, AntMediaApplicationAdapter, ApplicationAdapter, ApplicationSchedulingService, MultiThreadedApplicationAdapter, QuartzSchedulingService

public interface ISchedulingService extends IScopeService
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 Details

  • Method Details

    • addScheduledJob

      String addScheduledJob(int interval, IScheduledJob job)
      Schedule a job for periodic execution.
      Parameters:
      interval - time in milliseconds between two notifications of the job
      job - the job to trigger periodically
      Returns:
      the name of the scheduled job
    • addScheduledOnceJob

      String addScheduledOnceJob(long timeDelta, IScheduledJob job)
      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 date
      job - the job to trigger
      Returns:
      the name of the scheduled job
    • addScheduledOnceJob

      String addScheduledOnceJob(Date date, IScheduledJob job)
      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 executed
      job - the job to trigger
      Returns:
      the name of the scheduled job
    • addScheduledJobAfterDelay

      String addScheduledJobAfterDelay(int interval, IScheduledJob job, int delay)
      Schedule a job for periodic execution which will start after the specifed delay.
      Parameters:
      interval - time in milliseconds between two notifications of the job
      job - the job to trigger periodically
      delay - time in milliseconds to pass before first execution.
      Returns:
      the name of the scheduled job
    • pauseScheduledJob

      void pauseScheduledJob(String name)
      Pauses the trigger which initiates job execution.
      Parameters:
      name - name of the job to stop
    • resumeScheduledJob

      void resumeScheduledJob(String name)
      Resumes the trigger which initiates job execution.
      Parameters:
      name - name of the job to stop
    • removeScheduledJob

      void removeScheduledJob(String name)
      Stop executing a previously scheduled job.
      Parameters:
      name - name of the job to stop
    • getScheduledJobNames

      List<String> getScheduledJobNames()
      Return names of scheduled jobs.
      Returns:
      list of job names