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 Type
    Method
    Description
    handle(Message message, ProcessingContext context, @Nullable T target, MessageHandlingMember<? super T> handler)
    Invokes the interceptors in this chain for the given message, ultimately invoking the given handler unless 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 given message, ultimately invoking the given handler unless an interceptor short-circuits the chain.
      Parameters:
      message - the message to intercept and, ultimately, handle
      context - the context under which the message is processed
      target - the instance declaring the interceptors and the handler, or null when there is no instance to invoke them on, in which case this chain must only contain static members
      handler - the handler to invoke once every interceptor has proceeded the chain
      Returns:
      a stream containing the result of handling the message