Class ObservedModuleType
java.lang.Object
org.springframework.modulith.observability.ObservedModuleType
Represents a type in an
ObservedModule
.- Author:
- Oliver Drotbohm
-
Constructor Summary
ConstructorDescriptionObservedModuleType
(ApplicationModules modules, ObservedModule module, ArchitecturallyEvidentType type) Creates a newObservedModuleType
for the givenApplicationModules
,ObservedModule
andArchitecturallyEvidentType
. -
Method Summary
Modifier and TypeMethodDescriptionReturns a predicate to filter the methods to intercept.boolean
Returns whether the type should be observed at all.
-
Constructor Details
-
ObservedModuleType
ObservedModuleType(ApplicationModules modules, ObservedModule module, ArchitecturallyEvidentType type) Creates a newObservedModuleType
for the givenApplicationModules
,ObservedModule
andArchitecturallyEvidentType
.- Parameters:
modules
- must not be null.module
- must not be null.type
- must not be null.
-
-
Method Details
-
shouldBeObserved
public boolean shouldBeObserved()Returns whether the type should be observed at all. Can be skipped for types not exposed by the module unless they listen to events of other modules.- Returns:
-
getMethodsToIntercept
Returns a predicate to filter the methods to intercept. For event listeners it's the listener methods only. For everything else, all (public) methods will be intercepted.- Returns:
-