Interface ReceiveMessageAdvice
- All Superinterfaces:
- Advice,- Interceptor,- MethodInterceptor
- All Known Subinterfaces:
- MessageSourceMutator
- All Known Implementing Classes:
- CompoundTriggerAdvice,- RotatingServerAdvice,- SimpleActiveIdleReceiveMessageAdvice
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
An AOP advice to perform hooks before and/or after a 
receive() contract is called.- Since:
- 5.3
- Author:
- Artem Bilan
- 
Method SummaryModifier and TypeMethodDescriptionMessage<?>afterReceive(Message<?> result, Object source) Subclasses can take actions based on the result of theJoinpoint.proceed(); e.g.default booleanbeforeReceive(Object source) Subclasses can decide whether toJoinpoint.proceed()or not.default Objectinvoke(MethodInvocation invocation) 
- 
Method Details- 
beforeReceiveSubclasses can decide whether toJoinpoint.proceed()or not.- Parameters:
- source- the source of the message to receive.
- Returns:
- true to proceed (default).
 
- 
invoke- Specified by:
- invokein interface- MethodInterceptor
- Throws:
- Throwable
 
- 
afterReceiveSubclasses can take actions based on the result of theJoinpoint.proceed(); e.g. adjust thetrigger. The message can also be replaced with a new one.- Parameters:
- result- the received message.
- source- the source of the message to receive.
- Returns:
- a message to continue to process the result, null to discard whatever
 the Joinpoint.proceed()returned.
 
 
-