Interface MessageMonitorFactory<M extends Message>
- Type Parameters:
M- the type ofMessagethe resultingMessageMonitorwill monitor
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface for building a
MessageMonitor for a specific component type and component name.
This interface allows MessageMonitors to be constructed with knowledge of the component they will monitor,
allowing for fine-grained control on how or when to construct an interceptor. This, for example, enables proper
tagging and categorization in metric systems.
- Since:
- 5.0.3
- Author:
- Steven van Beelen
-
Method Summary
Modifier and TypeMethodDescription@Nullable MessageMonitor<? super M> build(@NonNull Configuration config, @NonNull Class<?> componentType, @Nullable String componentName) Builds aMessageMonitorfor the specified component.
-
Method Details
-
build
@Nullable MessageMonitor<? super M> build(@NonNull Configuration config, @NonNull Class<?> componentType, @Nullable String componentName) Builds aMessageMonitorfor the specified component.- Parameters:
config- theConfigurationfrom which other components can be retrieved during constructioncomponentType- the type of the component to build a monitor forcomponentName- the name of the component to build a monitor for- Returns:
- a
MessageMonitorinstance configured for the specified component ornullwhen no monitor is required for the givencomponentTypeandcomponentNamecombination
-