Class ObservedModuleType
java.lang.Object
org.springframework.modulith.observability.ObservedModuleType
Represents a type in an
ObservedModule.- Author:
- Oliver Drotbohm
-
Constructor Summary
ConstructorsConstructorDescriptionObservedModuleType(org.springframework.modulith.core.ApplicationModules modules, ObservedModule module, org.springframework.modulith.core.ArchitecturallyEvidentType type) Creates a newObservedModuleTypefor the givenApplicationModules,ObservedModuleandArchitecturallyEvidentType. -
Method Summary
Modifier and TypeMethodDescriptionReturns a predicate to filter the methods to intercept.booleanReturns whether the type should be observed at all.
-
Constructor Details
-
ObservedModuleType
ObservedModuleType(org.springframework.modulith.core.ApplicationModules modules, ObservedModule module, org.springframework.modulith.core.ArchitecturallyEvidentType type) Creates a newObservedModuleTypefor the givenApplicationModules,ObservedModuleandArchitecturallyEvidentType.- 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. All user declared methods are intercepted, except from well-known interfaces (Advised,TargetClassAware). For event listeners, package-protected methods are supported as well.- Returns:
- will never be null.
-