Class QuartzSchedulerMBeanImpl

    • Field Detail

      • emitter

        protected final org.quartz.core.QuartzSchedulerMBeanImpl.Emitter emitter
        emitter
      • sequenceNumber

        protected final java.util.concurrent.atomic.AtomicLong sequenceNumber
        sequenceNumber
    • Constructor Detail

      • QuartzSchedulerMBeanImpl

        protected QuartzSchedulerMBeanImpl​(QuartzScheduler scheduler)
                                    throws javax.management.NotCompliantMBeanException
        QuartzSchedulerMBeanImpl
        Throws:
        javax.management.NotCompliantMBeanException
    • Method Detail

      • getCurrentlyExecutingJobs

        public javax.management.openmbean.TabularData getCurrentlyExecutingJobs()
                                                                         throws java.lang.Exception
        Specified by:
        getCurrentlyExecutingJobs in interface QuartzSchedulerMBean
        Returns:
        TabularData of CompositeData:JobExecutionContext
        Throws:
        java.lang.Exception
      • getAllJobDetails

        public javax.management.openmbean.TabularData getAllJobDetails()
                                                                throws java.lang.Exception
        Specified by:
        getAllJobDetails in interface QuartzSchedulerMBean
        Returns:
        TabularData of CompositeData:JobDetail
        Throws:
        java.lang.Exception
        See Also:
        JobDetailSupport
      • getAllTriggers

        public java.util.List<javax.management.openmbean.CompositeData> getAllTriggers()
                                                                                throws java.lang.Exception
        Specified by:
        getAllTriggers in interface QuartzSchedulerMBean
        Returns:
        List of CompositeData:[CronTrigger|SimpleTrigger]
        Throws:
        java.lang.Exception
        See Also:
        TriggerSupport
      • addJob

        public void addJob​(javax.management.openmbean.CompositeData jobDetail,
                           boolean replace)
                    throws java.lang.Exception
        Specified by:
        addJob in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • scheduleBasicJob

        public void scheduleBasicJob​(java.util.Map<java.lang.String,​java.lang.Object> jobDetailInfo,
                                     java.util.Map<java.lang.String,​java.lang.Object> triggerInfo)
                              throws java.lang.Exception
        Description copied from interface: QuartzSchedulerMBean
        Schedules a job using the given Cron/Simple triggerInfo. The triggerInfo and jobDetailInfo must contain well-known attribute values. TriggerInfo attributes: name, group, description, calendarName, priority, CronExpression | (startTime, endTime, repeatCount, repeatInterval) JobDetailInfo attributes: name, group, description, jobClass, jobDataMap, durability, shouldRecover
        Specified by:
        scheduleBasicJob in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • scheduleJob

        public void scheduleJob​(java.util.Map<java.lang.String,​java.lang.Object> abstractJobInfo,
                                java.util.Map<java.lang.String,​java.lang.Object> abstractTriggerInfo)
                         throws java.lang.Exception
        Description copied from interface: QuartzSchedulerMBean
        Schedules an arbitrary job described by abstractJobInfo using a trigger specified by abstractTriggerInfo. AbtractTriggerInfo and AbstractJobInfo must contain the following String attributes. AbstractTriggerInfo: triggerClass, the fully-qualified class name of a concrete Trigger type AbstractJobInfo: jobDetailClass, the fully-qualified class name of a concrete JobDetail type If the Trigger and JobDetail can be successfully instantiated, the remaining attributes will be reflectively applied to those instances. The remaining attributes are limited to the types: Integer, Double, Float, String, Boolean, Date, Character, Map<String, Object>. Maps are further limited to containing values from the same set of types, less Map itself.
        Specified by:
        scheduleJob in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • scheduleJob

        public void scheduleJob​(java.lang.String jobName,
                                java.lang.String jobGroup,
                                java.util.Map<java.lang.String,​java.lang.Object> abstractTriggerInfo)
                         throws java.lang.Exception
        Description copied from interface: QuartzSchedulerMBean
        Schedules the specified job using a trigger described by abstractTriggerInfo, which must contain the fully-qualified trigger class name under the key "triggerClass." That trigger type must contain a no-arg constructor and have public access. Other attributes are applied reflectively and are limited to the types: Integer, Double, Float, String, Boolean, Date, Character, Map<String, Object>. Maps are limited to containing values from the same set of types, less Map itself.
        Specified by:
        scheduleJob in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • addJob

        public void addJob​(java.util.Map<java.lang.String,​java.lang.Object> abstractJobInfo,
                           boolean replace)
                    throws java.lang.Exception
        Description copied from interface: QuartzSchedulerMBean
        Adds a durable job described by abstractJobInfo, which must contain the fully-qualified JobDetail class name under the key "jobDetailClass." That JobDetail type must contain a no-arg constructor and have public access. Other attributes are applied reflectively and are limited to the types: Integer, Double, Float, String, Boolean, Date, Character, Map<String, Object>. Maps are limited to containing values from the same set of types, less Map itself.
        Specified by:
        addJob in interface QuartzSchedulerMBean
        Parameters:
        abstractJobInfo - map of attributes defining job
        replace - whether or not to replace a pre-existing job with the same key
        Throws:
        java.lang.Exception
      • deleteCalendar

        public void deleteCalendar​(java.lang.String calendarName)
                            throws java.lang.Exception
        Specified by:
        deleteCalendar in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • deleteJob

        public boolean deleteJob​(java.lang.String jobName,
                                 java.lang.String jobGroupName)
                          throws java.lang.Exception
        Specified by:
        deleteJob in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • getCalendarNames

        public java.util.List<java.lang.String> getCalendarNames()
                                                          throws java.lang.Exception
        Specified by:
        getCalendarNames in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • getJobDetail

        public javax.management.openmbean.CompositeData getJobDetail​(java.lang.String jobName,
                                                                     java.lang.String jobGroupName)
                                                              throws java.lang.Exception
        Specified by:
        getJobDetail in interface QuartzSchedulerMBean
        Returns:
        CompositeData:JobDetail
        Throws:
        java.lang.Exception
        See Also:
        JobDetailSupport
      • getJobGroupNames

        public java.util.List<java.lang.String> getJobGroupNames()
                                                          throws java.lang.Exception
        Specified by:
        getJobGroupNames in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • getJobNames

        public java.util.List<java.lang.String> getJobNames​(java.lang.String groupName)
                                                     throws java.lang.Exception
        Specified by:
        getJobNames in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • getPausedTriggerGroups

        public java.util.Set<java.lang.String> getPausedTriggerGroups()
                                                               throws java.lang.Exception
        Specified by:
        getPausedTriggerGroups in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • getTrigger

        public javax.management.openmbean.CompositeData getTrigger​(java.lang.String name,
                                                                   java.lang.String groupName)
                                                            throws java.lang.Exception
        Specified by:
        getTrigger in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • getTriggerGroupNames

        public java.util.List<java.lang.String> getTriggerGroupNames()
                                                              throws java.lang.Exception
        Specified by:
        getTriggerGroupNames in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • getTriggerNames

        public java.util.List<java.lang.String> getTriggerNames​(java.lang.String groupName)
                                                         throws java.lang.Exception
        Specified by:
        getTriggerNames in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • getTriggerState

        public java.lang.String getTriggerState​(java.lang.String triggerName,
                                                java.lang.String triggerGroupName)
                                         throws java.lang.Exception
        Specified by:
        getTriggerState in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • getTriggersOfJob

        public java.util.List<javax.management.openmbean.CompositeData> getTriggersOfJob​(java.lang.String jobName,
                                                                                         java.lang.String jobGroupName)
                                                                                  throws java.lang.Exception
        Specified by:
        getTriggersOfJob in interface QuartzSchedulerMBean
        Returns:
        List of CompositeData:[CronTrigger|SimpleTrigger] for the specified job.
        Throws:
        java.lang.Exception
        See Also:
        TriggerSupport
      • interruptJob

        public boolean interruptJob​(java.lang.String jobName,
                                    java.lang.String jobGroupName)
                             throws java.lang.Exception
        Specified by:
        interruptJob in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • interruptJob

        public boolean interruptJob​(java.lang.String fireInstanceId)
                             throws java.lang.Exception
        Specified by:
        interruptJob in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • scheduleJob

        public java.util.Date scheduleJob​(java.lang.String jobName,
                                          java.lang.String jobGroup,
                                          java.lang.String triggerName,
                                          java.lang.String triggerGroup)
                                   throws java.lang.Exception
        Description copied from interface: QuartzSchedulerMBean
        Schedule an existing job with an existing trigger.
        Specified by:
        scheduleJob in interface QuartzSchedulerMBean
        Returns:
        date of nextFireTime
        Throws:
        java.lang.Exception
      • unscheduleJob

        public boolean unscheduleJob​(java.lang.String triggerName,
                                     java.lang.String triggerGroup)
                              throws java.lang.Exception
        Specified by:
        unscheduleJob in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • clear

        public void clear()
                   throws java.lang.Exception
        Specified by:
        clear in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • start

        public void start()
                   throws java.lang.Exception
        Specified by:
        start in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • pauseJob

        public void pauseJob​(java.lang.String jobName,
                             java.lang.String jobGroup)
                      throws java.lang.Exception
        Specified by:
        pauseJob in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • pauseJobs

        public void pauseJobs​(GroupMatcher<JobKey> matcher)
                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • pauseJobGroup

        public void pauseJobGroup​(java.lang.String jobGroup)
                           throws java.lang.Exception
        Specified by:
        pauseJobGroup in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • pauseJobsStartingWith

        public void pauseJobsStartingWith​(java.lang.String jobGroupPrefix)
                                   throws java.lang.Exception
        Description copied from interface: QuartzSchedulerMBean
        Pause all jobs whose group starts with jobGroupPrefix
        Specified by:
        pauseJobsStartingWith in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • pauseJobsEndingWith

        public void pauseJobsEndingWith​(java.lang.String jobGroupSuffix)
                                 throws java.lang.Exception
        Description copied from interface: QuartzSchedulerMBean
        Pause all jobs whose group ends with jobGroupSuffix
        Specified by:
        pauseJobsEndingWith in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • pauseJobsContaining

        public void pauseJobsContaining​(java.lang.String jobGroupToken)
                                 throws java.lang.Exception
        Description copied from interface: QuartzSchedulerMBean
        Pause all jobs whose group contains jobGroupToken
        Specified by:
        pauseJobsContaining in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • pauseTriggerGroup

        public void pauseTriggerGroup​(java.lang.String triggerGroup)
                               throws java.lang.Exception
        Specified by:
        pauseTriggerGroup in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • pauseTriggersStartingWith

        public void pauseTriggersStartingWith​(java.lang.String triggerGroupPrefix)
                                       throws java.lang.Exception
        Description copied from interface: QuartzSchedulerMBean
        Pause all triggers whose group starts with triggerGroupPrefix
        Specified by:
        pauseTriggersStartingWith in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • pauseTriggersEndingWith

        public void pauseTriggersEndingWith​(java.lang.String triggerGroupSuffix)
                                     throws java.lang.Exception
        Description copied from interface: QuartzSchedulerMBean
        Pause all triggers whose group ends with triggerGroupSuffix
        Specified by:
        pauseTriggersEndingWith in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • pauseTriggersContaining

        public void pauseTriggersContaining​(java.lang.String triggerGroupToken)
                                     throws java.lang.Exception
        Description copied from interface: QuartzSchedulerMBean
        Pause all triggers whose group contains triggerGroupToken
        Specified by:
        pauseTriggersContaining in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • pauseTrigger

        public void pauseTrigger​(java.lang.String triggerName,
                                 java.lang.String triggerGroup)
                          throws java.lang.Exception
        Specified by:
        pauseTrigger in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • resumeJob

        public void resumeJob​(java.lang.String jobName,
                              java.lang.String jobGroup)
                       throws java.lang.Exception
        Specified by:
        resumeJob in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • resumeJobs

        public void resumeJobs​(GroupMatcher<JobKey> matcher)
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • resumeJobGroup

        public void resumeJobGroup​(java.lang.String jobGroup)
                            throws java.lang.Exception
        Description copied from interface: QuartzSchedulerMBean
        Resume all jobs in the given group
        Specified by:
        resumeJobGroup in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • resumeJobsStartingWith

        public void resumeJobsStartingWith​(java.lang.String jobGroupPrefix)
                                    throws java.lang.Exception
        Description copied from interface: QuartzSchedulerMBean
        Resume all jobs whose group starts with jobGroupPrefix
        Specified by:
        resumeJobsStartingWith in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • resumeJobsEndingWith

        public void resumeJobsEndingWith​(java.lang.String jobGroupSuffix)
                                  throws java.lang.Exception
        Description copied from interface: QuartzSchedulerMBean
        Resume all jobs whose group ends with jobGroupSuffix
        Specified by:
        resumeJobsEndingWith in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • resumeJobsContaining

        public void resumeJobsContaining​(java.lang.String jobGroupToken)
                                  throws java.lang.Exception
        Description copied from interface: QuartzSchedulerMBean
        Resume all jobs whose group contains jobGroupToken
        Specified by:
        resumeJobsContaining in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • resumeTrigger

        public void resumeTrigger​(java.lang.String triggerName,
                                  java.lang.String triggerGroup)
                           throws java.lang.Exception
        Specified by:
        resumeTrigger in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • resumeTriggerGroup

        public void resumeTriggerGroup​(java.lang.String triggerGroup)
                                throws java.lang.Exception
        Specified by:
        resumeTriggerGroup in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • resumeTriggersStartingWith

        public void resumeTriggersStartingWith​(java.lang.String triggerGroupPrefix)
                                        throws java.lang.Exception
        Description copied from interface: QuartzSchedulerMBean
        Resume all triggers whose group starts with triggerGroupPrefix
        Specified by:
        resumeTriggersStartingWith in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • resumeTriggersEndingWith

        public void resumeTriggersEndingWith​(java.lang.String triggerGroupSuffix)
                                      throws java.lang.Exception
        Description copied from interface: QuartzSchedulerMBean
        Resume all triggers whose group ends with triggerGroupSuffix
        Specified by:
        resumeTriggersEndingWith in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • resumeTriggersContaining

        public void resumeTriggersContaining​(java.lang.String triggerGroupToken)
                                      throws java.lang.Exception
        Description copied from interface: QuartzSchedulerMBean
        Resume all triggers whose group contains triggerGroupToken
        Specified by:
        resumeTriggersContaining in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • triggerJob

        public void triggerJob​(java.lang.String jobName,
                               java.lang.String jobGroup,
                               java.util.Map<java.lang.String,​java.lang.String> jobDataMap)
                        throws java.lang.Exception
        Specified by:
        triggerJob in interface QuartzSchedulerMBean
        Throws:
        java.lang.Exception
      • triggerJob

        public void triggerJob​(javax.management.openmbean.CompositeData trigger)
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • jobsPaused

        public void jobsPaused​(java.lang.String jobGroup)
        Description copied from interface: SchedulerListener

        Called by the Scheduler when a group of JobDetails has been paused.

        Specified by:
        jobsPaused in interface SchedulerListener
        Parameters:
        jobGroup - the paused group, or null if all were paused
      • schedulerError

        public void schedulerError​(java.lang.String msg,
                                   SchedulerException cause)
        Description copied from interface: SchedulerListener

        Called by the Scheduler when a serious error has occurred within the scheduler - such as repeated failures in the JobStore, or the inability to instantiate a Job instance when its Trigger has fired.

        The getErrorCode() method of the given SchedulerException can be used to determine more specific information about the type of error that was encountered.

        Specified by:
        schedulerError in interface SchedulerListener
      • triggersPaused

        public void triggersPaused​(java.lang.String triggerGroup)
        Description copied from interface: SchedulerListener

        Called by the Scheduler when a group of Triggers has been paused.

        If all groups were paused then triggerGroup will be null

        Specified by:
        triggersPaused in interface SchedulerListener
        Parameters:
        triggerGroup - the paused group, or null if all were paused
      • getName

        public java.lang.String getName()
        Description copied from interface: JobListener

        Get the name of the JobListener.

        Specified by:
        getName in interface JobListener
      • sendNotification

        public void sendNotification​(java.lang.String eventType)
        sendNotification
        Parameters:
        eventType -
      • sendNotification

        public void sendNotification​(java.lang.String eventType,
                                     java.lang.Object data)
        sendNotification
        Parameters:
        eventType -
        data -
      • sendNotification

        public void sendNotification​(java.lang.String eventType,
                                     java.lang.Object data,
                                     java.lang.String msg)
        sendNotification
        Parameters:
        eventType -
        data -
        msg -
      • addNotificationListener

        public void addNotificationListener​(javax.management.NotificationListener notif,
                                            javax.management.NotificationFilter filter,
                                            java.lang.Object callBack)
        Specified by:
        addNotificationListener in interface javax.management.NotificationBroadcaster
        See Also:
        NotificationBroadcaster.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
      • getNotificationInfo

        public javax.management.MBeanNotificationInfo[] getNotificationInfo()
        Specified by:
        getNotificationInfo in interface javax.management.NotificationBroadcaster
        See Also:
        NotificationBroadcaster.getNotificationInfo()
      • removeNotificationListener

        public void removeNotificationListener​(javax.management.NotificationListener listener)
                                        throws javax.management.ListenerNotFoundException
        Specified by:
        removeNotificationListener in interface javax.management.NotificationBroadcaster
        Throws:
        javax.management.ListenerNotFoundException
        See Also:
        NotificationBroadcaster.removeNotificationListener(javax.management.NotificationListener)
      • removeNotificationListener

        public void removeNotificationListener​(javax.management.NotificationListener notif,
                                               javax.management.NotificationFilter filter,
                                               java.lang.Object callBack)
                                        throws javax.management.ListenerNotFoundException
        Specified by:
        removeNotificationListener in interface javax.management.NotificationEmitter
        Throws:
        javax.management.ListenerNotFoundException
        See Also:
        NotificationEmitter.removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)