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 StringSCHEDULE_PROPERTYSchedule property namestatic StringTIMEZONE_PROPERTYTimezone (Cron jobs only)static StringTRIGGER_TYPE_CRONCron trigger type namestatic StringTRIGGER_TYPE_PROPERTYTrigger type namestatic StringTRIGGER_TYPE_SIMPLESimple 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 StringgetCronExpression()Return a cron expression only for the cron trigger, otherwise null.StringgetInterval()Return the repeat interval only for simple Trigger, otherwise null.org.quartz.JobDetailgetJob()Return job details.StringgetRepeat()Return repeat info only for simple Trigger, otherwise null.StringgetSchedule()Return schedule information.StringgetTimeZone()Return the timezone.org.quartz.TriggergetTrigger()Return a trigger with any type (simple or cron).org.quartz.Trigger.TriggerStategetTriggerState()Return the trigger state.StringgetTriggerStateAsString()Return the trigger state as a string.StringgetTriggerType()Return the trigger type.booleanisExecuting()Check if the job is executingbooleanisTriggerCron()Return whether a trigger is cron.booleanisTriggerSimple()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.SchedulerExceptionCheck if the job is executing- Returns:
- true if it is currently executing
- Throws:
org.quartz.SchedulerException- if an error occurs.
-
-