Class CompoundTrigger

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

public class CompoundTrigger extends Object implements org.springframework.scheduling.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
  • Constructor Summary

    Constructors
    Constructor
    Description
    CompoundTrigger(org.springframework.scheduling.Trigger primary)
    Construct a compound trigger with the supplied primary trigger.
  • Method Summary

    Modifier and Type
    Method
    Description
    nextExecution(org.springframework.scheduling.TriggerContext triggerContext)
     
    void
    setOverride(org.springframework.scheduling.Trigger override)
    Set the override trigger; set to null to revert to using the primary trigger.
    final void
    setPrimary(org.springframework.scheduling.Trigger primary)
    Set the primary trigger.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.scheduling.Trigger

    nextExecutionTime
  • Constructor Details

    • CompoundTrigger

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

    • setPrimary

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

      public void setOverride(org.springframework.scheduling.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(org.springframework.scheduling.TriggerContext triggerContext)
      Specified by:
      nextExecution in interface org.springframework.scheduling.Trigger