Package com.avoka.fc.core.service
Class JobAndTrigger
- java.lang.Object
-
- com.avoka.fc.core.service.JobAndTrigger
-
public class JobAndTrigger extends Object
Defines the Job and Trigger object for quartz.
-
-
Field Summary
Fields Modifier and Type Field Description static String
SCHEDULE_PROPERTY
Schedule property namestatic String
TIMEZONE_PROPERTY
Timezone (Cron jobs only)static String
TRIGGER_TYPE_CRON
Cron trigger type namestatic String
TRIGGER_TYPE_PROPERTY
Trigger type namestatic String
TRIGGER_TYPE_SIMPLE
Simple trigger type name
-
Constructor Summary
Constructors Constructor Description JobAndTrigger(org.quartz.JobDetail jobDetail, org.quartz.Trigger trigger, org.quartz.Scheduler scheduler)
Create a quartz job value object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCronExpression()
Return a cron expression only for the cron trigger, otherwise null.String
getInterval()
Return the repeat interval only for simple Trigger, otherwise null.org.quartz.JobDetail
getJob()
Return job details.String
getRepeat()
Return repeat info only for simple Trigger, otherwise null.String
getSchedule()
Return schedule information.String
getTimeZone()
Return the timezone.org.quartz.Trigger
getTrigger()
Return a trigger with any type (simple or cron).org.quartz.Trigger.TriggerState
getTriggerState()
Return the trigger state.String
getTriggerStateAsString()
Return the trigger state as a string.String
getTriggerType()
Return the trigger type.boolean
isExecuting()
Check if the job is executingboolean
isTriggerCron()
Return whether a trigger is cron.boolean
isTriggerSimple()
Return whether a trigger is simple.
-
-
-
Field Detail
-
SCHEDULE_PROPERTY
public static final String SCHEDULE_PROPERTY
Schedule property name- See Also:
- Constant Field Values
-
TIMEZONE_PROPERTY
public static final String TIMEZONE_PROPERTY
Timezone (Cron jobs only)- See Also:
- Constant Field Values
-
TRIGGER_TYPE_PROPERTY
public static final String TRIGGER_TYPE_PROPERTY
Trigger type name- See Also:
- Constant Field Values
-
TRIGGER_TYPE_SIMPLE
public static final String TRIGGER_TYPE_SIMPLE
Simple trigger type name- See Also:
- Constant Field Values
-
TRIGGER_TYPE_CRON
public static final String TRIGGER_TYPE_CRON
Cron trigger type name- See Also:
- Constant Field Values
-
-
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.
-
-