public class MessageAuthorizationDispatchInterceptor<T extends Message<?>> extends Object implements MessageDispatchInterceptor<T>
MessageDispatchInterceptor
that adds the {$code username} and {$code authorities} from the authorized
principle.Constructor and Description |
---|
MessageAuthorizationDispatchInterceptor() |
Modifier and Type | Method and Description |
---|---|
BiFunction<Integer,T,T> |
handle(List<? extends T> list)
Apply this interceptor to the given list of
messages . |
T |
handle(T message)
Invoked each time a message is about to be dispatched.
|
public MessageAuthorizationDispatchInterceptor()
@Nonnull public T handle(@Nonnull T message)
MessageDispatchInterceptor
message
represents the message being
dispatched.handle
in interface MessageDispatchInterceptor<T extends Message<?>>
message
- The message intended to be dispatched@Nonnull public BiFunction<Integer,T,T> handle(@Nonnull List<? extends T> list)
MessageDispatchInterceptor
messages
. This method returns a function that can be invoked
to obtain a modified version of messages at each position in the list.handle
in interface MessageDispatchInterceptor<T extends Message<?>>
list
- The Messages to pre-processCopyright © 2010–2025. All rights reserved.