Class CompoundTrigger

java.lang.Object
org.springframework.integration.util.CompoundTrigger
All Implemented Interfaces:
Trigger

public class CompoundTrigger extends Object implements Trigger
A Trigger that delegates the Trigger.nextExecutionTime(TriggerContext) to one of two Triggers. If the override trigger is null, the primary trigger is invoked; otherwise the override trigger is invoked.
Since:
4.3
Author:
Gary Russell, Artem Bilan
  • Constructor Details

    • CompoundTrigger

      public CompoundTrigger(Trigger primary)
      Construct a compound trigger with the supplied primary trigger.
      Parameters:
      primary - the primary trigger.
  • Method Details

    • setPrimary

      public final void setPrimary(Trigger primary)
      Set the primary trigger.
      Parameters:
      primary - the trigger.
    • setOverride

      public void setOverride(Trigger override)
      Set the override trigger; set to null to revert to using the primary trigger.
      Parameters:
      override - the override trigger, or null.
    • nextExecution

      public Instant nextExecution(TriggerContext triggerContext)
      Specified by:
      nextExecution in interface Trigger