Class MessageAuthorizationDispatchInterceptor<T extends Message<?>>

java.lang.Object
org.axonframework.spring.authorization.MessageAuthorizationDispatchInterceptor<T>
All Implemented Interfaces:
MessageDispatchInterceptor<T>

public class MessageAuthorizationDispatchInterceptor<T extends Message<?>> extends Object implements MessageDispatchInterceptor<T>
A MessageDispatchInterceptor that adds the {$code authorities} from the authorized principle.
Since:
4.11.0
Author:
Roald Bankras
  • Constructor Details

    • MessageAuthorizationDispatchInterceptor

      public MessageAuthorizationDispatchInterceptor()
  • Method Details

    • handle

      @Nonnull public T handle(@Nonnull T message)
      Description copied from interface: MessageDispatchInterceptor
      Invoked each time a message is about to be dispatched. The given message represents the message being dispatched.
      Specified by:
      handle in interface MessageDispatchInterceptor<T extends Message<?>>
      Parameters:
      message - The message intended to be dispatched
      Returns:
      the message to dispatch
    • handle

      @Nonnull public BiFunction<Integer,T,T> handle(@Nonnull List<? extends T> list)
      Description copied from interface: MessageDispatchInterceptor
      Apply this interceptor to the given list of messages. This method returns a function that can be invoked to obtain a modified version of messages at each position in the list.
      Specified by:
      handle in interface MessageDispatchInterceptor<T extends Message<?>>
      Parameters:
      list - The Messages to pre-process
      Returns:
      a function that processes messages based on their position in the list