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,ReadyAndReadyListener,ReadyListener
Tracks
StateAware beans in the system and generates events
when StateAware beans change.- Version:
- 2023-10-07
-
Method Summary
Modifier and TypeMethodDescriptionvoidManually register a bean with the service.voidunregister(StateBean bean) Unregister a bean with the service.Methods inherited from class com.tccc.kos.commons.core.service.AbstractService
getHandle, getHandlePrefixMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tccc.kos.commons.core.context.CtxEventListener
onCtxAutowiringCompleted, onCtxDestroyed, onCtxPhaseCompletedMethods inherited from interface com.tccc.kos.commons.core.service.handle.HandleAware
addHandleChild, getName, getPathMethods inherited from interface com.tccc.kos.commons.util.ready.ReadyAndReadyListener
onBeanReady, onDependenciesReadyMethods 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
-