Class DefaultObservedModule
java.lang.Object
org.springframework.modulith.observability.DefaultObservedModule
- All Implemented Interfaces:
ObservedModule
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
exposes
(com.tngtech.archunit.core.domain.JavaClass type) Returns whether theObservedModule
exposes the givenJavaClass
.Returns the human-readable name of the module.Returns theApplicationModuleIdentifier
of the underlying module.getInvokedMethod
(MethodInvocation invocation) Returns the name of the actually invokedMethod
.getName()
Returns the name of the application module.getObservedModuleType
(Class<?> type, ApplicationModules modules) Returns theObservedModuleType
for the given type andApplicationModules
.boolean
isEventListenerInvocation
(MethodInvocation invocation) Returns whether the givenMethodInvocation
is the invocation of an event listener as opposed to a standard method invocation on a Spring bean.boolean
isObservedModule
(ApplicationModule module)
-
Constructor Details
-
DefaultObservedModule
DefaultObservedModule(ApplicationModule module) Creates a newDefaultObservedModule
for the givenApplicationModule
.- Parameters:
module
- must not be null.
-
-
Method Details
-
getName
Description copied from interface:ObservedModule
Returns the name of the application module.- Specified by:
getName
in interfaceObservedModule
- Returns:
- will never be null.
-
getIdentifier
Description copied from interface:ObservedModule
Returns theApplicationModuleIdentifier
of the underlying module.- Specified by:
getIdentifier
in interfaceObservedModule
- Returns:
- will never be null.
-
getDisplayName
Description copied from interface:ObservedModule
Returns the human-readable name of the module.- Specified by:
getDisplayName
in interfaceObservedModule
- Returns:
- will never be null.
-
getInvokedMethod
Description copied from interface:ObservedModule
Returns the name of the actually invokedMethod
.- Specified by:
getInvokedMethod
in interfaceObservedModule
- Parameters:
invocation
- must not be null.- Returns:
-
exposes
public boolean exposes(com.tngtech.archunit.core.domain.JavaClass type) Description copied from interface:ObservedModule
Returns whether theObservedModule
exposes the givenJavaClass
.- Specified by:
exposes
in interfaceObservedModule
- Returns:
-
isObservedModule
- Specified by:
isObservedModule
in interfaceObservedModule
-
getObservedModuleType
Description copied from interface:ObservedModule
Returns theObservedModuleType
for the given type andApplicationModules
.- Specified by:
getObservedModuleType
in interfaceObservedModule
- Parameters:
type
- must not be null.modules
- must not be null.- Returns:
- the
ObservedModuleType
for the given type or null if the type is not to be observed.
-
isEventListenerInvocation
Description copied from interface:ObservedModule
Returns whether the givenMethodInvocation
is the invocation of an event listener as opposed to a standard method invocation on a Spring bean.- Specified by:
isEventListenerInvocation
in interfaceObservedModule
- Parameters:
invocation
- must not be null.
-