Class MultiMessageMonitor<T extends Message>

java.lang.Object
org.axonframework.messaging.monitoring.MultiMessageMonitor<T>
All Implemented Interfaces:
MessageMonitor<T>

public class MultiMessageMonitor<T extends Message> extends Object implements MessageMonitor<T>
Delegates messages and callbacks to the given list of message monitors
Since:
3.0
Author:
Marijn van Zelst
  • Constructor Details

    • MultiMessageMonitor

      @SafeVarargs public MultiMessageMonitor(MessageMonitor<? super T>... messageMonitors)
      Initialize a message monitor with the given messageMonitors
      Parameters:
      messageMonitors - the list of event monitors to delegate to
    • MultiMessageMonitor

      public MultiMessageMonitor(List<MessageMonitor<? super T>> messageMonitors)
      Initialize a message monitor with the given list of messageMonitors
      Parameters:
      messageMonitors - the list of event monitors to delegate to
  • Method Details

    • onMessageIngested

      public MessageMonitor.MonitorCallback onMessageIngested(@Nonnull T message)
      Calls the message monitors with the given message and returns a callback that will trigger all the message monitor callbacks
      Specified by:
      onMessageIngested in interface MessageMonitor<T extends Message>
      Parameters:
      message - the message to delegate to the message monitors
      Returns:
      the callback that will trigger all the message monitor callbacks
    • messageMonitors

      public List<MessageMonitor<? super T>> messageMonitors()
      Inspect the contained message monitors.
      Returns:
      unmodifiable list of contained message monitors