public abstract class AbstractMessageSourceAdvice extends Object implements MethodInterceptor
MessageSource.receive()
method to decide whether a poll
should be ignored and/or take action after the receive.Constructor and Description |
---|
AbstractMessageSourceAdvice() |
Modifier and Type | Method and Description |
---|---|
abstract Message<?> |
afterReceive(Message<?> result,
MessageSource<?> source)
Subclasses can take actions based on the result of the poll; e.g.
|
abstract boolean |
beforeReceive(MessageSource<?> source)
Subclasses can decide whether to proceed with this poll.
|
Object |
invoke(MethodInvocation invocation) |
public final Object invoke(MethodInvocation invocation) throws Throwable
invoke
in interface MethodInterceptor
Throwable
public abstract boolean beforeReceive(MessageSource<?> source)
source
- the message source.public abstract Message<?> afterReceive(Message<?> result, MessageSource<?> source)
trigger
. The message can also be replaced with a new one.result
- the received message.source
- the message source.