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
Author:
Allard Buijze
  • Method Summary

    Modifier and Type
    Method
    Description
    handle(Message<?> message, T target, MessageHandlingMember<? super T> handler)
    Handle the given message by passing it through the interceptors and ultimately to the given handler on the given target instance.
  • Method Details

    • handle

      Object handle(@Nonnull Message<?> message, @Nonnull T target, @Nonnull MessageHandlingMember<? super T> handler) throws Exception
      Handle the given message by passing it through the interceptors and ultimately to the given handler on the given target instance. The result of this invocation is the result as given by the handler, possibly modified by any of the interceptors in this chain.
      Parameters:
      message - The message to pass through the interceptor chain
      target - The target instance to invoke the interceptors and handlers on
      handler - The actual handler to invoke once all interceptors have received the message
      Returns:
      the result as returned by the handlers or interceptors
      Throws:
      Exception - any exception thrown by the handler or any of the interceptors