Class AbstractQuartzTriggerActivator
- java.lang.Object
-
- com.atlassian.bamboo.trigger.quartz.AbstractQuartzTriggerActivator
-
- All Implemented Interfaces:
TriggerActivator
- Direct Known Subclasses:
CronTriggerActivator
,DailyTriggerActivator
,PollingTriggerActivator
,StashTriggerActivator
public abstract class AbstractQuartzTriggerActivator extends Object implements TriggerActivator
-
-
Field Summary
Fields Modifier and Type Field Description protected org.quartz.Scheduler
scheduler
-
Constructor Summary
Constructors Constructor Description AbstractQuartzTriggerActivator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
activate(@NotNull Triggerable triggerable, @NotNull TriggerDefinition triggerDefinition)
This method should activate any services or threads that are required for this trigger to function.protected org.quartz.JobDetail
createJobDetail(@NotNull Triggerable triggerable, TriggerDefinition triggerDefinition, @NotNull String jobName)
void
deactivate(@NotNull Triggerable triggerable, @NotNull TriggerDefinition triggerDefinition)
This method should deactivate any services or threads related to this trigger This method is called: - when triggered object is removed - when trigger is removed - before update of triggered object's configuration - when trigger plugin module is disabledprotected org.quartz.Scheduler
getScheduler()
Deprecated.since 5.14 usescheduler
directlyprotected abstract @NotNull Class<? extends org.quartz.Job>
getStrategyJob()
protected abstract @Nullable org.quartz.Trigger
getTrigger(@NotNull Triggerable triggerable, @NotNull TriggerDefinition triggerDefinition, @Nullable Date lastShutdownTime)
protected String
getUniqueId(Triggerable triggerable, TriggerDefinition triggerDefinition)
void
initAndActivate(@NotNull Triggerable triggerable, @NotNull TriggerDefinition triggerDefinition, @Nullable Date lastShutdownTime)
This method is called on Bamboo server startup and when trigger plugin is enabled.void
setScheduler(org.quartz.Scheduler scheduler)
Deprecated.since 6.8 use constructor injection or annotation injection
-
-
-
Method Detail
-
initAndActivate
public void initAndActivate(@NotNull @NotNull Triggerable triggerable, @NotNull @NotNull TriggerDefinition triggerDefinition, @Nullable @Nullable Date lastShutdownTime)
Description copied from interface:TriggerActivator
This method is called on Bamboo server startup and when trigger plugin is enabled. It should activate any services or threads that are required for this trigger to function. In most cases it should be the same asTriggerActivator.activate(Triggerable, TriggerDefinition)
- Specified by:
initAndActivate
in interfaceTriggerActivator
- Parameters:
triggerable
- object to be triggeredtriggerDefinition
- how trigger is configuredlastShutdownTime
- last recorded shutdown time or null if no record of server having been shut down is available
-
activate
public void activate(@NotNull @NotNull Triggerable triggerable, @NotNull @NotNull TriggerDefinition triggerDefinition)
Description copied from interface:TriggerActivator
This method should activate any services or threads that are required for this trigger to function. This method is called: - after trigger creation - after trigger update - after update of triggered object's configuration- Specified by:
activate
in interfaceTriggerActivator
- Parameters:
triggerable
- object to be triggeredtriggerDefinition
- how trigger is configured
-
deactivate
public void deactivate(@NotNull @NotNull Triggerable triggerable, @NotNull @NotNull TriggerDefinition triggerDefinition)
Description copied from interface:TriggerActivator
This method should deactivate any services or threads related to this trigger This method is called: - when triggered object is removed - when trigger is removed - before update of triggered object's configuration - when trigger plugin module is disabled- Specified by:
deactivate
in interfaceTriggerActivator
- Parameters:
triggerable
- object not to be triggeredtriggerDefinition
- how trigger is configured
-
getUniqueId
protected String getUniqueId(Triggerable triggerable, TriggerDefinition triggerDefinition)
-
createJobDetail
protected org.quartz.JobDetail createJobDetail(@NotNull @NotNull Triggerable triggerable, TriggerDefinition triggerDefinition, @NotNull @NotNull String jobName)
-
getStrategyJob
@NotNull protected abstract @NotNull Class<? extends org.quartz.Job> getStrategyJob()
-
getTrigger
@Nullable protected abstract @Nullable org.quartz.Trigger getTrigger(@NotNull @NotNull Triggerable triggerable, @NotNull @NotNull TriggerDefinition triggerDefinition, @Nullable @Nullable Date lastShutdownTime)
-
getScheduler
@Deprecated protected org.quartz.Scheduler getScheduler()
Deprecated.since 5.14 usescheduler
directly
-
setScheduler
@Deprecated public void setScheduler(org.quartz.Scheduler scheduler)
Deprecated.since 6.8 use constructor injection or annotation injection
-
-