Package org.axonframework.micrometer
Class PayloadTypeMessageMonitorWrapper<T extends MessageMonitor<Message<?>>>
java.lang.Object
org.axonframework.micrometer.PayloadTypeMessageMonitorWrapper<T>
- Type Parameters:
T- The type of the MessageMonitor created for every payload type.Must implement bothMessageMonitor
- All Implemented Interfaces:
MessageMonitor<Message<?>>
@Deprecated
public class PayloadTypeMessageMonitorWrapper<T extends MessageMonitor<Message<?>>>
extends Object
implements MessageMonitor<Message<?>>
Deprecated.
A
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}.
- Since:
- 4.1
- Author:
- Steven van Beelen, Marijn van Zelst
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.axonframework.monitoring.MessageMonitor
MessageMonitor.MonitorCallback -
Constructor Summary
ConstructorsConstructorDescriptionPayloadTypeMessageMonitorWrapper(Function<String, T> monitorSupplier) Deprecated.Create a PayloadTypeMessageMonitorWrapper which builds monitors through a givenmonitorSupplierfor every message payload type encountered.PayloadTypeMessageMonitorWrapper(Function<String, T> monitorSupplier, Function<Class<?>, String> monitorNameBuilder) Deprecated.Create a PayloadTypeMessageMonitorWrapper which builds monitors through a givenmonitorSupplierfor every message payload type encountered and sets the monitor name as specified by themonitorNameBuilder. -
Method Summary
Modifier and TypeMethodDescriptiononMessageIngested(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 messageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.axonframework.monitoring.MessageMonitor
onMessagesIngested
-
Constructor Details
-
PayloadTypeMessageMonitorWrapper
Deprecated.Create a PayloadTypeMessageMonitorWrapper which builds monitors through a givenmonitorSupplierfor every message payload type encountered.- Parameters:
monitorSupplier- A Supplier of MessageMonitors of typeTfor every encountered payload type
-
PayloadTypeMessageMonitorWrapper
public PayloadTypeMessageMonitorWrapper(Function<String, T> monitorSupplier, Function<Class<?>, String> monitorNameBuilder) Deprecated.Create a PayloadTypeMessageMonitorWrapper which builds monitors through a givenmonitorSupplierfor every message payload type encountered and sets the monitor name as specified by themonitorNameBuilder.- Parameters:
monitorSupplier- A Function to create a MessageMonitor of typeT, with the givenStringas name, for every encountered payload typemonitorNameBuilder- A Function where the payload type is the input (of typeClass<?>) and output is the desired name for the monitor (of typeString)
-
-
Method Details
-
onMessageIngested
Deprecated.Description copied from interface:MessageMonitorTakes a message and returns a callback that should be used to inform the message monitor about the result of processing the message- Specified by:
onMessageIngestedin interfaceMessageMonitor<T extends MessageMonitor<Message<?>>>- Parameters:
message- the message to monitor- Returns:
- the callback
-
invalid reference
invalid input: 'to achieve the same behavior as this implementation.'