Interface MessageHandlerInterceptorMemberChain<T>
- Type Parameters:
T- The type that declares the handlers in this chain
- All Known Implementing Classes:
ChainedMessageHandlerInterceptorMember,NoMoreInterceptors
public interface MessageHandlerInterceptorMemberChain<T>
Interface to interact with a MessageHandlingMember instance through a chain of interceptors, which were used to build
up this chain. Unlike regular handlers, interceptors have the ability to act on messages on their way to the regular
handler, and have the ability to block these messages.
- Since:
- 4.4.0
- Author:
- Allard Buijze
-
Method Summary
Modifier and TypeMethodDescriptionhandle(Message message, ProcessingContext context, @Nullable T target, MessageHandlingMember<? super T> handler) Invokes the interceptors in this chain for the givenmessage, ultimately invoking the givenhandlerunless an interceptor short-circuits the chain.
-
Method Details
-
handle
MessageStream<?> handle(Message message, ProcessingContext context, @Nullable T target, MessageHandlingMember<? super T> handler) Invokes the interceptors in this chain for the givenmessage, ultimately invoking the givenhandlerunless an interceptor short-circuits the chain.- Parameters:
message- the message to intercept and, ultimately, handlecontext- the context under which themessageis processedtarget- the instance declaring the interceptors and thehandler, ornullwhen there is no instance to invoke them on, in which case this chain must only containstaticmembershandler- the handler to invoke once every interceptor has proceeded the chain- Returns:
- a stream containing the result of handling the
message
-