Class TimeBasedEventTriggerManager

java.lang.Object
com.persequor.saga.modules.timebasedlogic.service.TimeBasedEventTriggerManager
All Implemented Interfaces:
ITimeBasedEventTriggerManager

@Singleton public class TimeBasedEventTriggerManager extends Object implements ITimeBasedEventTriggerManager
  • Constructor Details

  • Method Details

    • enableTrigger

      public void enableTrigger(String ruleId, com.persequor.event.Event sourceEvent, String triggerKey, ZonedDateTime fireAt)
      Description copied from interface: ITimeBasedEventTriggerManager
      Enables an event trigger.
      Specified by:
      enableTrigger in interface ITimeBasedEventTriggerManager
      Parameters:
      ruleId - - ID of the rule responsible for enabling the trigger type at hand, see ITimeBasedEventRule.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

      public <T> void enableTrigger(String ruleId, com.persequor.event.Event sourceEvent, String triggerKey, ZonedDateTime fireAt, T additionalData)
      Description copied from interface: ITimeBasedEventTriggerManager
      Enables an event trigger of the generic class type T.
      Specified by:
      enableTrigger in interface ITimeBasedEventTriggerManager
      Type Parameters:
      T - - Additional data type.
      Parameters:
      ruleId - - ID of the rule responsible for enabling the trigger type at hand, see ITimeBasedEventRule.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

      public void revokeTrigger(String ruleId, String triggerKey)
      Description copied from interface: ITimeBasedEventTriggerManager
      Revoke a trigger on a trigger key.
      Specified by:
      revokeTrigger in interface ITimeBasedEventTriggerManager
      Parameters:
      ruleId - - ID of the trigger rule responsible for enabling the trigger to be revoked, see ITimeBasedEventRule.getId().
      triggerKey - - Key identifying the trigger among others. E.g. an EPC.
    • fire

      public void fire(String ruleId, String triggerKey)
      Description copied from interface: ITimeBasedEventTriggerManager
      Fire the trigger before revoking it, without taking the fireAt time into consideration.
      Specified by:
      fire in interface ITimeBasedEventTriggerManager
      Parameters:
      ruleId - - ID of the trigger rule responsible for enabling the trigger to be fired, see ITimeBasedEventRule.getId().
      triggerKey - - Key identifying the trigger among others. E.g. an EPC.
    • fire

      public void fire(UUID timeBasedTriggerId)
      Description copied from interface: ITimeBasedEventTriggerManager
      Fire the trigger before revoking it, without taking the fireAt time into consideration.
      Specified by:
      fire in interface ITimeBasedEventTriggerManager
      Parameters:
      timeBasedTriggerId - - ID of the trigger.