Class StateService
java.lang.Object
com.tccc.kos.commons.util.ready.ReadyBean
com.tccc.kos.commons.core.service.AbstractService
com.tccc.kos.commons.core.service.state.StateService
- All Implemented Interfaces:
CtxEventListener
,ContextHandleAware
,HandleAware
,Ready
,ReadyListener
Tracks
StateAware
beans in the system and generates events
when StateAware
beans change.- Version:
- 2023-10-07
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Manually register a bean with the service.void
unregister
(StateBean bean) Unregister a bean with the service.Methods inherited from class com.tccc.kos.commons.core.service.AbstractService
getHandle, getHandlePrefix
Methods inherited from class com.tccc.kos.commons.util.ready.ReadyBean
getReady, onBeanReady, onDependenciesReady
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.tccc.kos.commons.core.context.CtxEventListener
onCtxAutowiringCompleted, onCtxDestroyed, onCtxPhaseCompleted
Methods inherited from interface com.tccc.kos.commons.core.service.handle.HandleAware
addHandleChild, getName, getPath
Methods inherited from interface com.tccc.kos.commons.util.ready.ReadyListener
onDependenciesGroupReady
-
Method Details
-
register
Manually register a bean with the service. This will prepare the bean for use with the service and include it in the list of known state beans that can be queried. This does not need to be called if the bean is added via autowiring in theBeanContext
. If this is called for a bean that was autowired it will have no effect as the bean has already been registered.- Parameters:
bean
- the bean to register
-
unregister
Unregister a bean with the service. This will remove the bean from the list of registered beans an will prevent the bean from being broadcast in the future. Unregistering a bean will remove it from the service regardless of how it was registered.- Parameters:
bean
- the bean to unregister
-