Package org.red5.server.api.scheduling

Examples of org.red5.server.api.scheduling.ISchedulingService


   * @param delay
   *            time in milliseconds to pass before first execution.
   * @return the name of the scheduled job
   */
  public String addScheduledJobAfterDelay(int interval, IScheduledJob job, int delay) {
    ISchedulingService service = (ISchedulingService) ScopeUtils.getScopeService(scope, ISchedulingService.class, QuartzSchedulingService.class, false);
    return service.addScheduledJobAfterDelay(interval, job, delay);
  }
View Full Code Here


   *
   * @param name
   *            Scheduled job name
   */
  public void pauseScheduledJob(String name) {
    ISchedulingService service = (ISchedulingService) ScopeUtils.getScopeService(scope, ISchedulingService.class, QuartzSchedulingService.class, false);
    service.pauseScheduledJob(name);
  }
View Full Code Here

   *
   * @param name
   *            Scheduled job name
   */
  public void resumeScheduledJob(String name) {
    ISchedulingService service = (ISchedulingService) ScopeUtils.getScopeService(scope, ISchedulingService.class, QuartzSchedulingService.class, false);
    service.resumeScheduledJob(name);
  }
View Full Code Here

   *
   * @param name
   *            Scheduled job name
   */
  public void removeScheduledJob(String name) {
    ISchedulingService service = (ISchedulingService) ScopeUtils.getScopeService(scope, ISchedulingService.class, QuartzSchedulingService.class, false);
    service.removeScheduledJob(name);
  }
View Full Code Here

   * Returns list of scheduled job names
   *
   * @return List of scheduled job names as list of Strings.
   */
  public List<String> getScheduledJobNames() {
    ISchedulingService service = (ISchedulingService) ScopeUtils.getScopeService(scope, ISchedulingService.class, QuartzSchedulingService.class, false);
    return service.getScheduledJobNames();
  }
View Full Code Here

      Scope scope = new DummyScope();
      scope.setName("");
      scope.setContext(ctx);
      pss.setScope(scope);
      //
      ISchedulingService schedulingService = (ISchedulingService) applicationContext.getBean(ISchedulingService.BEAN_NAME);
      IConsumerService consumerService = (IConsumerService) applicationContext.getBean(IConsumerService.KEY);
      IProviderService providerService = (IProviderService) applicationContext.getBean(IProviderService.BEAN_NAME);
      //create and get the engine
      PlayEngine engine = pss.createEngine(schedulingService, consumerService, providerService);
      //mock the message output
View Full Code Here

    boolean removed = listeners.remove(listener);
    if (!keepOnDisconnect) {
      if (removed && keepAliveJobName == null) {
        if (ScopeUtils.isRoom(this) && listeners.isEmpty()) {
          // create job to kill the scope off if no listeners join within the delay
          ISchedulingService schedulingService = (ISchedulingService) parent.getContext().getBean(ISchedulingService.BEAN_NAME);
          // by default keep a scope around for a fraction of a second
          keepAliveJobName = schedulingService.addScheduledOnceJob((keepDelay > 0 ? keepDelay * 1000 : 100), new KeepAliveJob(this));
        }
      }
    } else {
      log.trace("Scope: {} is exempt from removal when empty", getName());
    }
View Full Code Here

    this.jobDataMap = jobDataMap;
  }
 
  public void execute() {
    log.debug("execute");
    ISchedulingService service = null;
    IScheduledJob job = null;
    try {
      service = (ISchedulingService) jobDataMap.get(SCHEDULING_SERVICE);
      job = (IScheduledJob) jobDataMap.get(SCHEDULED_JOB);
      job.execute(service);
View Full Code Here

 
  /** {@inheritDoc} */
  @Override
  protected void executeInternal(JobExecutionContext executionContext) throws JobExecutionException {
    log.debug("execute: {}", executionContext);
    ISchedulingService service = null;
    IScheduledJob job = null;
    try {
      JobDetail jobDetail = executionContext.getJobDetail();
      JobDataMap dataMap = jobDetail.getJobDataMap();
      service = (ISchedulingService) dataMap.get(SCHEDULING_SERVICE);
View Full Code Here

     */
    private Logger log = LoggerFactory.getLogger( QuartzSchedulingService.class );

    /** {@inheritDoc} */
    public void execute(JobExecutionContext arg0) throws JobExecutionException {
    ISchedulingService service = (ISchedulingService) arg0.getJobDetail()
        .getJobDataMap().get(SCHEDULING_SERVICE);
    IScheduledJob job = (IScheduledJob) arg0.getJobDetail().getJobDataMap()
        .get(SCHEDULED_JOB);
        try {
            job.execute(service);
View Full Code Here

TOP

Related Classes of org.red5.server.api.scheduling.ISchedulingService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.