JavaScript is disabled on your browser.
Skip navigation links
org.apache.synapse.task

Class TaskScheduler



  • public class TaskScheduler
    extends Object 
    Abstraction for scheduling a Task
    • Field Detail

      • QUARTZ_CONF

        public static final String QUARTZ_CONF
        Property look up key for get a quartz configuration
        See Also:
        Constant Field Values
    • Constructor Detail

      • TaskScheduler

        public TaskScheduler(String name)
    • Method Detail

      • init

        public void init(Properties properties)
        Initialize the scheduler based on provided properties Looking for 'quartz.conf' and if found , use it for initiating quartz scheduler
        Parameters:
        properties - Properties
      • start

        public void start()
        Explicitly start up call for scheduler, return if already it has been started
      • pauseAll

        public void pauseAll()
        Pauses all tasks.
        Throws:
        SynapseTaskException - if an error occurs pausing all tasks.
      • resumeAll

        public void resumeAll()
      • scheduleTask

        public void scheduleTask(TaskDescription taskDescription,
         Map<String,Object> resources,
         Class<? extends org.quartz.Job> jobClass)
        Schedule a Task
        Parameters:
        taskDescription - TaskDescription , an information about Task
        resources - Any initial resources for task
        jobClass - Quartz job class
      • scheduleTask

        public void scheduleTask(TaskDescription taskDescription,
         Map<String,Object> resources,
         Class<? extends org.quartz.Job> jobClass,
         Task task)
        Schedule a Task
        Parameters:
        taskDescription - TaskDescription , an information about Task
        resources - Any initial resources for task
        jobClass - Quartz job class
        task - The task to be executed
      • shutDown

        public void shutDown()
        ShutDown the underlying quartz scheduler
      • isInitialized

        public boolean isInitialized()
        Returns:
        Returns true if the scheduler is ready for schedule a task
      • deleteTask

        public void deleteTask(String name,
         String group)
        Deletes a Task
        Parameters:
        name - Name of the Task
        group - Group name of the task Default value @see org.apache.synapse.util.task.TaskDescription.DEFAULT_GROUP
      • getRunningTaskCount

        public int getRunningTaskCount()
      • setTriggerFactory

        public void setTriggerFactory(TaskTriggerFactory triggerFactory)
        Sets a Trigger Factory , if it needs to void using default factory
        Parameters:
        triggerFactory - TaskTriggerFactory instance
      • setJobDetailFactory

        public void setJobDetailFactory(TaskJobDetailFactory jobDetailFactory)
        Sets a JobDetail Factory, if it needs to void using default factory
        Parameters:
        jobDetailFactory - TaskJobDetailFactory instance
Skip navigation links

Copyright © 2005-2017 Apache Software Foundation. All Rights Reserved.

AltStyle によって変換されたページ (->オリジナル) /