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 Details

    • handleSync

      @Internal @Deprecated(forRemoval=true, since="5.2.0") Object handleSync(@Nonnull Message message, @Nonnull ProcessingContext context, @Nonnull T target, @Nonnull MessageHandlingMember<? super T> handler) throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      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.
      context - The context in which the message is being handled.
      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.
    • handleSync

      @Internal @Deprecated(forRemoval=true, since="5.2.0") default Object handleSync(@Nonnull Message message, @Nonnull T target, @Nonnull MessageHandlingMember<? super T> handler) throws Exception
      Deprecated, for removal: This API element is subject to removal in a future version.
      Throws:
      Exception
    • handle

      default MessageStream<?> handle(@Nonnull Message message, @Nonnull ProcessingContext context, @Nonnull T target, @Nonnull MessageHandlingMember<? super T> handler)