public class CompoundTrigger extends Object implements Trigger
Trigger
that delegates the nextExecutionTime(TriggerContext)
to one of two Triggers. If the override
trigger is
null
, the primary trigger is invoked; otherwise the override trigger is
invoked.Constructor and Description |
---|
CompoundTrigger(Trigger primary)
Construct a compound trigger with the supplied primary trigger.
|
Modifier and Type | Method and Description |
---|---|
Date |
nextExecutionTime(TriggerContext triggerContext) |
void |
setOverride(Trigger override)
Set the override trigger; set to null to revert to using the
primary trigger.
|
void |
setPrimary(Trigger primary)
Set the primary trigger.
|
public CompoundTrigger(Trigger primary)
primary
- the primary trigger.public final void setPrimary(Trigger primary)
primary
- the trigger.public void setOverride(Trigger override)
override
- the override trigger, or null.public Date nextExecutionTime(TriggerContext triggerContext)
nextExecutionTime
in interface Trigger