T
- The type of the MessageMonitor created for every payload type.Must implement both MessageMonitor
Tag
s on the monitor implementations.
Use {@link org.axonframework.micrometer.GlobalMetricRegistry#registerWithConfigurerWithDefaultTags(Configurer) to achieve the same behavior as this implementation.@Deprecated public class PayloadTypeMessageMonitorWrapper<T extends MessageMonitor<Message<?>>> extends Object implements MessageMonitor<Message<?>>
MessageMonitor
implementation which creates a new MessageMonitor for every Message
payload type
ingested by it. The PayloadTypeMessageMonitorWrapper keeps track of all distinct payload types it has created
and only creates a new one if there is none present.
The type of MessageMonitor which is created for every payload type is configurable, as long as it implements MessageMonitor}.
MessageMonitor.MonitorCallback
Constructor and Description |
---|
PayloadTypeMessageMonitorWrapper(Function<String,T> monitorSupplier)
Deprecated.
Create a PayloadTypeMessageMonitorWrapper which builds monitors through a given
monitorSupplier for
every message payload type encountered. |
PayloadTypeMessageMonitorWrapper(Function<String,T> monitorSupplier,
Function<Class<?>,String> monitorNameBuilder)
Deprecated.
Create a PayloadTypeMessageMonitorWrapper which builds monitors through a given
monitorSupplier for
every message payload type encountered and sets the monitor name as specified by the monitorNameBuilder . |
Modifier and Type | Method and Description |
---|---|
MessageMonitor.MonitorCallback |
onMessageIngested(Message<?> message)
Deprecated.
Takes a message and returns a callback that should be used
to inform the message monitor about the result of processing the message
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onMessagesIngested
public PayloadTypeMessageMonitorWrapper(Function<String,T> monitorSupplier)
monitorSupplier
for
every message payload type encountered.monitorSupplier
- A Supplier of MessageMonitors of type T
for every encountered payload typepublic PayloadTypeMessageMonitorWrapper(Function<String,T> monitorSupplier, Function<Class<?>,String> monitorNameBuilder)
monitorSupplier
for
every message payload type encountered and sets the monitor name as specified by the monitorNameBuilder
.monitorSupplier
- A Function to create a MessageMonitor of type T
, with the given String
as name, for every encountered payload typemonitorNameBuilder
- A Function where the payload type is the input (of type Class<?>
) and output
is the desired name for the monitor (of type String
)public MessageMonitor.MonitorCallback onMessageIngested(Message<?> message)
MessageMonitor
onMessageIngested
in interface MessageMonitor<Message<?>>
message
- the message to monitorCopyright © 2010–2022. All rights reserved.