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
,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 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.service.config.ConfigAware
onConfigChanged, onConfigSet
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
-
Constructor Details
-
AbstractConfigurable
-
-
Method Details
-
getConfig
Retrieves the configuration bean.- Specified by:
getConfig
in interfaceConfigAware<T extends ConfigBean>
- Returns:
- the config bean
-
setConfig
Sets the configuration bean.- Specified by:
setConfig
in interfaceConfigAware<T extends ConfigBean>
- Parameters:
config
- the config bean
-
getHandle
Description copied from interface:HandleAware
Returns the handle for this bean. This is used by the context to compute the opaque handle for the object.- Specified by:
getHandle
in interfaceHandleAware
- Returns:
- the handle node for the bean
-