Package de.otto.synapse.endpoint
Interface MessageInterceptor
-
- All Known Implementing Classes:
InterceptorChain,JournalingInterceptor,MessageFilter,MethodInvokingMessageInterceptor,SubscriptionInterceptor
- 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 MessageInterceptorMessage interceptors are used to intercept messages before they are sent or received bymessage endpoints.MessageInterceptors will usually be chained using a
InterceptorChain.A
MessageInterceptorcan 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
All Methods Instance Methods Abstract Methods 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 Detail
-
intercept
@Nullable TextMessage intercept(@Nonnull 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- 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.
-
-