@Override public Message<?> afterReceive(Message<?> result, MessageSource<?> source) { if (result == null) { this.compoundTrigger.setOverride(this.override); } else { this.compoundTrigger.setOverride(null); } return result; }
/** * Construct a compound trigger with the supplied primary trigger. * @param primary the primary trigger. */ public CompoundTrigger(Trigger primary) { setPrimary(primary); }
final CountDownLatch latch = new CountDownLatch(5); final LinkedList<Object> overridePresent = new LinkedList<>(); final CompoundTrigger compoundTrigger = new CompoundTrigger(new PeriodicTrigger(10)); Trigger override = spy(new PeriodicTrigger(5)); final CompoundTriggerAdvice advice = new CompoundTriggerAdvice(compoundTrigger, override);
@Override public Message<?> afterReceive(Message<?> result, MessageSource<?> source) { if (result == null) { this.compoundTrigger.setOverride(this.override); } else { this.compoundTrigger.setOverride(null); } return result; }
/** * Construct a compound trigger with the supplied primary trigger. * @param primary the primary trigger. */ public CompoundTrigger(Trigger primary) { setPrimary(primary); }