T
- The message type this interceptor can processpublic interface MessageDispatchInterceptor<T extends Message<?>>
Modifier and Type | Method and Description |
---|---|
BiFunction<Integer,T,T> |
handle(List<? extends T> messages)
Apply this interceptor to the given list of
messages . |
default T |
handle(T message)
Invoked each time a message is about to be dispatched.
|
@Nonnull default T handle(@Nonnull T message)
message
represents the message being
dispatched.message
- The message intended to be dispatched@Nonnull BiFunction<Integer,T,T> handle(@Nonnull List<? extends T> messages)
messages
. This method returns a function that can be invoked
to obtain a modified version of messages at each position in the list.messages
- The Messages to pre-processCopyright © 2010–2024. All rights reserved.