com.atlassian.confluence.functest.rest.admin
Class SchedulerResource

java.lang.Object
  extended by com.atlassian.confluence.functest.rest.admin.SchedulerResource

public class SchedulerResource
extends Object

Modifies the Scheduler. Called by SchedulerRpc.


Constructor Summary
SchedulerResource(com.atlassian.event.api.EventPublisher eventPublisher, org.quartz.Scheduler scheduler)
           
 
Method Summary
 void changeJobGroupState(String jobGroupName, Map<String,Object> command)
          Pauses and resumes all jobs in a group.
 void changeJobState(String jobGroupName, String jobName, Map<String,Object> command)
          Controls a single job.
 void changeSchedulerState(Map<String,Object> command)
          Pauses and resumes the quartz scheduler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchedulerResource

public SchedulerResource(com.atlassian.event.api.EventPublisher eventPublisher,
                         org.quartz.Scheduler scheduler)
Method Detail

changeSchedulerState

public void changeSchedulerState(Map<String,Object> command)
                          throws org.quartz.SchedulerException
Pauses and resumes the quartz scheduler.

Parameters:
command - the command for the scheduler, name entry may be "pause", "resume" or "shutdown"
Throws:
org.quartz.SchedulerException

changeJobGroupState

public void changeJobGroupState(String jobGroupName,
                                Map<String,Object> command)
Pauses and resumes all jobs in a group.

Parameters:
jobGroupName - the name of the group to control
command - the command for the group, name entry may be "pause" or "resume"

changeJobState

public void changeJobState(String jobGroupName,
                           String jobName,
                           Map<String,Object> command)
Controls a single job. Available commands are: 1. pause - pauses the job 2. resume - resumes a paused job 3. trigger - triggers the job synchronously. Note that Quartz's triggerJob function is asynchronous, but we use a listener internally to provide synchronicity.

Parameters:
jobName - the name of the job to control
command - the command for the group, name entry may be "pause", "resume" or "trigger"


Copyright © 2003–2015 Atlassian. All rights reserved.