Class StateService
java.lang.Object
com.kosdev.kos.commons.core.service.state.StateService
Tracks
StateAware beans in the system and generates events
when StateAware beans change.- Since:
- 1
- Version:
- 1
-
Method Summary
Modifier and TypeMethodDescriptionvoidManually register a bean with the service.voidunregister(StateBean bean) Unregister a bean with the service.
-
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- Since:
- 1
-
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- Since:
- 1
-