Class JobAndTrigger


  • public class JobAndTrigger
    extends Object
    Defines the Job and Trigger object for quartz.
    • Constructor Detail

      • JobAndTrigger

        public JobAndTrigger​(org.quartz.JobDetail jobDetail,
                             org.quartz.Trigger trigger,
                             org.quartz.Scheduler scheduler)
        Create a quartz job value object.
        Parameters:
        jobDetail - the job details
        trigger - the associated trigger
        scheduler - the associated scheduler
    • Method Detail

      • getJob

        public org.quartz.JobDetail getJob()
        Return job details.
        Returns:
        job details
      • getTrigger

        public org.quartz.Trigger getTrigger()
        Return a trigger with any type (simple or cron).
        Returns:
        a trigger with any type (simple or cron)
      • getTimeZone

        public String getTimeZone()
        Return the timezone.
        Returns:
        the timezone
        Since:
        4.2.0
      • isTriggerCron

        public boolean isTriggerCron()
        Return whether a trigger is cron.
        Returns:
        whether a trigger is cron
      • isTriggerSimple

        public boolean isTriggerSimple()
        Return whether a trigger is simple.
        Returns:
        whether a trigger is simple
      • getTriggerType

        public String getTriggerType()
        Return the trigger type.
        Returns:
        the trigger type
      • getTriggerState

        public org.quartz.Trigger.TriggerState getTriggerState()
        Return the trigger state.
        Returns:
        the trigger state
      • getTriggerStateAsString

        public String getTriggerStateAsString()
        Return the trigger state as a string.
        Returns:
        the trigger state as a string
      • getRepeat

        public String getRepeat()
        Return repeat info only for simple Trigger, otherwise null.
        Returns:
        repeat info only for simple Trigger, otherwise null.
      • getInterval

        public String getInterval()
        Return the repeat interval only for simple Trigger, otherwise null.
        Returns:
        the repeat interval only for simple Trigger, otherwise null
      • getCronExpression

        public String getCronExpression()
        Return a cron expression only for the cron trigger, otherwise null.
        Returns:
        a cron expression only for the cron trigger, otherwise null
      • getSchedule

        public String getSchedule()
        Return schedule information.
        Returns:
        schedule information
      • isExecuting

        public boolean isExecuting()
                            throws org.quartz.SchedulerException
        Check if the job is executing
        Returns:
        true if it is currently executing
        Throws:
        org.quartz.SchedulerException - if an error occurs.