@FunctionalInterface public interface MessageSourceMutator extends ReceiveMessageAdvice
ReceiveMessageAdvice extension that can mutate a MessageSource before and/or after
MessageSource.receive() is called.| Modifier and Type | Method and Description |
|---|---|
org.springframework.messaging.Message<?> |
afterReceive(org.springframework.messaging.Message<?> result,
MessageSource<?> source)
Subclasses can take actions based on the result of the poll; e.g.
|
default org.springframework.messaging.Message<?> |
afterReceive(org.springframework.messaging.Message<?> result,
java.lang.Object source)
Subclasses can take actions based on the result of the
Joinpoint.proceed(); e.g. |
default boolean |
beforeReceive(MessageSource<?> source)
Subclasses can decide whether to proceed with this poll.
|
default boolean |
beforeReceive(java.lang.Object source)
Subclasses can decide whether to
Joinpoint.proceed() or not. |
invokedefault boolean beforeReceive(java.lang.Object source)
ReceiveMessageAdviceJoinpoint.proceed() or not.beforeReceive in interface ReceiveMessageAdvicesource - the source of the message to receive.default boolean beforeReceive(MessageSource<?> source)
source - the message source.@Nullable
default org.springframework.messaging.Message<?> afterReceive(@Nullable
org.springframework.messaging.Message<?> result,
java.lang.Object source)
ReceiveMessageAdviceJoinpoint.proceed(); e.g.
adjust the trigger. The message can also be replaced with a new one.afterReceive in interface ReceiveMessageAdviceresult - the received message.source - the source of the message to receive.Joinpoint.proceed() returned.@Nullable
org.springframework.messaging.Message<?> afterReceive(@Nullable
org.springframework.messaging.Message<?> result,
MessageSource<?> source)
trigger. The message can also be replaced with a new one.result - the received message.source - the message source.