public class CompoundTriggerAdvice extends AbstractMessageSourceAdvice implements ReceiveMessageAdvice
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)
Deprecated.
since 5.3 in favor of
afterReceive(Message, Object) |
Message<?> |
afterReceive(Message<?> result,
Object source)
Subclasses can take actions based on the result of the
Joinpoint.proceed(); e.g. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbeforeReceive, invokebeforeReceive, beforeReceivepublic CompoundTriggerAdvice(CompoundTrigger compoundTrigger, Trigger overrideTrigger)
@Deprecated public Message<?> afterReceive(Message<?> result, MessageSource<?> source)
afterReceive(Message, Object)MessageSourceMutatortrigger. The message can also be replaced with a new one.afterReceive in interface MessageSourceMutatorresult - the received message.source - the message source.@Nullable public Message<?> afterReceive(@Nullable Message<?> result, Object source)
ReceiveMessageAdviceJoinpoint.proceed(); e.g.
adjust the trigger. The message can also be replaced with a new one.afterReceive in interface MessageSourceMutatorafterReceive in interface ReceiveMessageAdviceresult - the received message.source - the source of the message to receive.Joinpoint.proceed() returned.