Package de.otto.synapse.endpoint
Interface MessageInterceptor
- All Known Implementing Classes:
InterceptorChain,JournalingInterceptor,MessageFilter,MethodInvokingMessageInterceptor
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface MessageInterceptor
Message interceptors are used to intercept messages before they are sent or received by
message endpoints.
MessageInterceptors will usually be chained using a InterceptorChain.
A MessageInterceptor can be used in different ways like, for example:
- Logging
- Calculating Metrics
- Wire Taps
Message Filters
...and many other.
- See Also:
- EIP: Message Filter, EIP: Wire Taps
-
Method Summary
Modifier and Type Method Description TextMessageintercept(TextMessage message)Intercept a message and return the same message, a modified version of the incoming message, or null, if the message should be filtered out and dropped by theAbstractMessageEndpoint
-
Method Details
-
intercept
Intercept a message and return the same message, a modified version of the incoming message, or null, if the message should be filtered out and dropped by theAbstractMessageEndpoint- Parameters:
message- the channel-layer message with payload-type beeing a String- Returns:
- intercepted version of the message, or null if the message should be dropped.
-