Class MonitoringSubscriptionQueryUpdateDispatchInterceptor
java.lang.Object
org.axonframework.messaging.monitoring.interception.MonitoringSubscriptionQueryUpdateDispatchInterceptor
- All Implemented Interfaces:
MessageDispatchInterceptor<SubscriptionQueryUpdateMessage>
public class MonitoringSubscriptionQueryUpdateDispatchInterceptor
extends Object
implements MessageDispatchInterceptor<SubscriptionQueryUpdateMessage>
A
MessageDispatchInterceptor that intercepts a MessageDispatchInterceptorChain of
SubscriptionQueryUpdateMessage and registers the MessageMonitor.MonitorCallback hooks for
reporting. Invoked by the InterceptingQueryBus.- Since:
- 5.0.0
- Author:
- Mateusz Nowak
-
Constructor Summary
ConstructorsConstructorDescriptionMonitoringSubscriptionQueryUpdateDispatchInterceptor(MessageMonitor<? super SubscriptionQueryUpdateMessage> messageMonitor) Constructs a new MonitoringSubscriptionQueryUpdateDispatchInterceptor using the givenMessageMonitor. -
Method Summary
Modifier and TypeMethodDescriptioninterceptOnDispatch(SubscriptionQueryUpdateMessage message, ProcessingContext context, MessageDispatchInterceptorChain<SubscriptionQueryUpdateMessage> interceptorChain) Intercepts a givenmessageon dispatching.
-
Constructor Details
-
MonitoringSubscriptionQueryUpdateDispatchInterceptor
public MonitoringSubscriptionQueryUpdateDispatchInterceptor(@Nonnull MessageMonitor<? super SubscriptionQueryUpdateMessage> messageMonitor) Constructs a new MonitoringSubscriptionQueryUpdateDispatchInterceptor using the givenMessageMonitor.- Parameters:
messageMonitor- TheMessageMonitorinstance used for reporting.
-
-
Method Details
-
interceptOnDispatch
@Nonnull public MessageStream<?> interceptOnDispatch(@Nonnull SubscriptionQueryUpdateMessage message, @Nullable ProcessingContext context, @Nonnull MessageDispatchInterceptorChain<SubscriptionQueryUpdateMessage> interceptorChain) Description copied from interface:MessageDispatchInterceptorIntercepts a givenmessageon dispatching. The implementer of this method might want to intercept the message before passing it to the chain (effectively before callingMessageDispatchInterceptorChain.proceed(Message, ProcessingContext)) or after the chain (by mapping the resulting message by callingMessageStream.mapMessage(Function)).- Specified by:
interceptOnDispatchin interfaceMessageDispatchInterceptor<SubscriptionQueryUpdateMessage>- Parameters:
message- The message to intercept on dispatching.context- The active processing context, if any. Can be used to (e.g.) validate correlation data.interceptorChain- The interceptor chain to signal that processing is finished and further interceptors should be called.- Returns:
- The resulting message stream from
MessageDispatchInterceptorChain.proceed(Message, ProcessingContext).
-