public interface TriggerActivator
Triggerable
in event handling service
- starting/stopping quartz polling job
Additional actions may be performed on server startup, for instance, triggers based on external events might
need to catch up with the events lost during Bamboo's inactivity.
Implementation should be stateless.Modifier and Type | Method and Description |
---|---|
void |
activate(Triggerable triggerable,
TriggerDefinition triggerDefinition)
This method should activate any services or threads that are required for this trigger to function.
|
void |
deactivate(Triggerable triggerable,
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 disabled
|
void |
initAndActivate(Triggerable triggerable,
TriggerDefinition triggerDefinition,
Date lastShutdownTime)
This method is called on Bamboo server startup and when trigger plugin is enabled.
|
void initAndActivate(@NotNull Triggerable triggerable, @NotNull TriggerDefinition triggerDefinition, @Nullable Date lastShutdownTime)
activate(Triggerable, TriggerDefinition)
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 availablevoid activate(@NotNull Triggerable triggerable, @NotNull TriggerDefinition triggerDefinition)
triggerable
- object to be triggeredtriggerDefinition
- how trigger is configuredvoid deactivate(@NotNull Triggerable triggerable, @NotNull TriggerDefinition triggerDefinition)
triggerable
- object not to be triggeredtriggerDefinition
- how trigger is configuredCopyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.