public class CompoundTriggerAdvice extends AbstractMessageSourceAdvice
AbstractMessageSourceAdvice that uses a CompoundTrigger to adjust
the poller - when a message is present, the compound trigger's primary trigger is
used to determine the next poll. When no message is present, the override trigger is
used.
The poller advised by this class must be configured to use the same
CompoundTrigger instance and must not use a task executor.
| Constructor and Description |
|---|
CompoundTriggerAdvice(CompoundTrigger compoundTrigger,
Trigger overrideTrigger) |
| Modifier and Type | Method and Description |
|---|---|
Message<?> |
afterReceive(Message<?> result,
MessageSource<?> source)
Subclasses can take actions based on the result of the poll; e.g.
|
invokeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbeforeReceivepublic CompoundTriggerAdvice(CompoundTrigger compoundTrigger, Trigger overrideTrigger)
public Message<?> afterReceive(Message<?> result, MessageSource<?> source)
MessageSourceMutatortrigger. The message can also be replaced with a new one.result - the received message.source - the message source.