Package com.avoka.fc.core.service
Class JobAndTrigger
java.lang.Object
com.avoka.fc.core.service.JobAndTrigger
Defines the Job and Trigger object for quartz.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionJobAndTrigger
(org.quartz.JobDetail jobDetail, org.quartz.Trigger trigger, org.quartz.Scheduler scheduler) Create a quartz job value object. -
Method Summary
Modifier and TypeMethodDescriptionReturn a cron expression only for the cron trigger, otherwise null.Return the repeat interval only for simple Trigger, otherwise null.org.quartz.JobDetail
getJob()
Return job details.Return repeat info only for simple Trigger, otherwise null.Return schedule information.Return the timezone.org.quartz.Trigger
Return a trigger with any type (simple or cron).org.quartz.Trigger.TriggerState
Return the trigger state.Return the trigger state as a string.Return the trigger type.boolean
Check if the job is executingboolean
Return whether a trigger is cron.boolean
Return whether a trigger is simple.
-
Field Details
-
SCHEDULE_PROPERTY
Schedule property name- See Also:
-
TIMEZONE_PROPERTY
Timezone (Cron jobs only)- See Also:
-
TRIGGER_TYPE_PROPERTY
Trigger type name- See Also:
-
TRIGGER_TYPE_SIMPLE
Simple trigger type name- See Also:
-
TRIGGER_TYPE_CRON
Cron trigger type name- See Also:
-
-
Constructor Details
-
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 detailstrigger
- the associated triggerscheduler
- the associated scheduler
-
-
Method Details
-
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
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
Return the trigger type.- Returns:
- the trigger type
-
getTriggerState
public org.quartz.Trigger.TriggerState getTriggerState()Return the trigger state.- Returns:
- the trigger state
-
getTriggerStateAsString
Return the trigger state as a string.- Returns:
- the trigger state as a string
-
getRepeat
Return repeat info only for simple Trigger, otherwise null.- Returns:
- repeat info only for simple Trigger, otherwise null.
-
getInterval
Return the repeat interval only for simple Trigger, otherwise null.- Returns:
- the repeat interval only for simple Trigger, otherwise null
-
getCronExpression
Return a cron expression only for the cron trigger, otherwise null.- Returns:
- a cron expression only for the cron trigger, otherwise null
-
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.
-