public class CompoundTriggerAdvice extends Object implements MessageSourceMutator, ReceiveMessageAdvice
MessageSourceMutator
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, wait
beforeReceive, beforeReceive
invoke
public CompoundTriggerAdvice(CompoundTrigger compoundTrigger, Trigger overrideTrigger)
@Deprecated public Message<?> afterReceive(Message<?> result, MessageSource<?> source)
afterReceive(Message, Object)
MessageSourceMutator
trigger
. The message can also be replaced with a new one.afterReceive
in interface MessageSourceMutator
result
- the received message.source
- the message source.@Nullable public Message<?> afterReceive(@Nullable Message<?> result, Object source)
ReceiveMessageAdvice
Joinpoint.proceed()
; e.g.
adjust the trigger
. The message can also be replaced with a new one.afterReceive
in interface MessageSourceMutator
afterReceive
in interface ReceiveMessageAdvice
result
- the received message.source
- the source of the message to receive.Joinpoint.proceed()
returned.