Package org.axonframework.config
Class LifecycleHandlerInspector
java.lang.Object
org.axonframework.config.LifecycleHandlerInspector
Utility class used to resolve
LifecycleHandlers to be registered to the Configuration. A StartHandler annotated lifecycle handler will be registered through LifecycleOperations.onStart(int, LifecycleHandler), whilst a ShutdownHandler annotated lifecycle handler will be registered through LifecycleOperations.onShutdown(int, LifecycleHandler).- Since:
- 4.3
- Author:
- Steven van Beelen
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidregisterLifecycleHandlers(Configuration configuration, Object component) Register any lifecycle handlers found on givencomponentwith givenconfiguration.
-
Method Details
-
registerLifecycleHandlers
Register any lifecycle handlers found on givencomponentwith givenconfiguration.If given
componentimplementsLifecycle, will allow it to register lifecycle handlers with the configuration. Otherwise, will resolveStartHandlerandShutdownHandlerannotated lifecycle handlers in the givencomponent. If present, they will be registered on the givenconfigurationthrough theLifecycleOperations.onStart(int, LifecycleHandler)andLifecycleOperations.onShutdown(int, LifecycleHandler)methods. If the givencomponentisnullit will be ignored.- Parameters:
configuration- theConfigurationto register resolved lifecycle handlers tocomponent- the object to resolve lifecycle handlers for
-