Class AbstractConfigurable<T extends ConfigBean>
java.lang.Object
com.tccc.kos.commons.util.ready.ReadyBean
com.tccc.kos.commons.core.service.config.AbstractConfigurable<T>
- All Implemented Interfaces:
ConfigAware<T>,HandleAware,Ready,ReadyAndReadyListener,ReadyListener
- Direct Known Subclasses:
ConfigSerialNumberProvider
public abstract class AbstractConfigurable<T extends ConfigBean>
extends ReadyBean
implements ConfigAware<T>
Abstract base class that can be used for objects that need to be configurable.
This is useful for classes that don't otherwise extend any other class and
want to get
ConfigAware support without any additional work. This is
simply a convenience class to simplify the implementation of ConfigAware.
This class does not implement ContextHandleAware so the handle will not
be automatically connected by adding it to a BeanContext. If you want
your bean handle to be automatically constructed from the context, simply
implement the ContextHandleAware interface.
- Since:
- 1.0
- Version:
- 2022-09-12
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.tccc.kos.commons.core.service.config.ConfigAware
onConfigChanged, onConfigSetMethods 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
-
Constructor Details
-
AbstractConfigurable
-
-
Method Details
-
getConfig
Retrieves the configuration bean.- Specified by:
getConfigin interfaceConfigAware<T extends ConfigBean>- Returns:
- the config bean
-
setConfig
Sets the configuration bean.- Specified by:
setConfigin interfaceConfigAware<T extends ConfigBean>- Parameters:
config- the config bean
-
getHandle
Description copied from interface:HandleAwareReturns the handle for this bean. This is used by the context to compute the opaque handle for the object.- Specified by:
getHandlein interfaceHandleAware- Returns:
- the handle node for the bean
-