Interface ITimeBasedEventTriggerManager
- All Known Implementing Classes:
TimeBasedEventTriggerManager
public interface ITimeBasedEventTriggerManager
Manager to access triggers from anywhere in the solution.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
enableTrigger
(String ruleId, com.persequor.event.Event sourceEvent, String triggerKey, ZonedDateTime fireAt) Enables an event trigger.<T> void
enableTrigger
(String ruleId, com.persequor.event.Event sourceEvent, String triggerKey, ZonedDateTime fireAt, T additionalData) Enables an event trigger of the generic class type T.void
Fire the trigger before revoking it, without taking the fireAt time into consideration.void
Fire the trigger before revoking it, without taking the fireAt time into consideration.void
revokeTrigger
(String ruleId, String triggerKey) Revoke a trigger on a trigger key.
-
Method Details
-
enableTrigger
void enableTrigger(String ruleId, com.persequor.event.Event sourceEvent, String triggerKey, ZonedDateTime fireAt) Enables an event trigger.- Parameters:
ruleId
- - ID of the rule responsible for enabling the trigger type at hand, seeITimeBasedEventRule.getId()
.sourceEvent
- - Event from which the triggers will be created.triggerKey
- - Key identifying the trigger among others for the specific event. E.g. an EPC.fireAt
- - When the logic is executed, unless the trigger is revoked.
-
enableTrigger
<T> void enableTrigger(String ruleId, com.persequor.event.Event sourceEvent, String triggerKey, ZonedDateTime fireAt, T additionalData) Enables an event trigger of the generic class type T.- Type Parameters:
T
- - Additional data type.- Parameters:
ruleId
- - ID of the rule responsible for enabling the trigger type at hand, seeITimeBasedEventRule.getId()
.sourceEvent
- - Event associated with the trigger.triggerKey
- - Key identifying the trigger among others for the specific event. E.g. an EPC.fireAt
- - When the logic is executed, unless the trigger is revoked.additionalData
- - Additional data that should be able to be serialized.
-
revokeTrigger
Revoke a trigger on a trigger key.- Parameters:
ruleId
- - ID of the trigger rule responsible for enabling the trigger to be revoked, seeITimeBasedEventRule.getId()
.triggerKey
- - Key identifying the trigger among others. E.g. an EPC.
-
fire
Fire the trigger before revoking it, without taking the fireAt time into consideration.- Parameters:
ruleId
- - ID of the trigger rule responsible for enabling the trigger to be fired, seeITimeBasedEventRule.getId()
.triggerKey
- - Key identifying the trigger among others. E.g. an EPC.
-
fire
Fire the trigger before revoking it, without taking the fireAt time into consideration.- Parameters:
idOfTimeBasedTrigger
- - ID of the trigger.
-