Interface ConfigAware<T extends ConfigBean>

All Superinterfaces:
HandleAware
All Known Implementing Classes:
AbstractConfigurable, AbstractConfigurableService, Application, ConfigSerialNumberProvider, Device, SystemApplication

public interface ConfigAware<T extends ConfigBean> extends HandleAware
Interface for objects that contain a ConfigBean. This bean can then be updated by the ConfigService.
Since:
1.0
Version:
2022-08-30
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the current config bean so that it can be updated.
    default void
    Called any time the configuration is changed after the initial onConfigSet() is called.
    default void
    Called the first time the configuration is set.
    void
    setConfig(T config)
    Sets the initial config bean.

    Methods inherited from interface com.tccc.kos.commons.core.service.handle.HandleAware

    addHandleChild, getHandle, getName, getPath
  • Method Details

    • getConfig

      T getConfig()
      Gets the current config bean so that it can be updated.
      Returns:
      the config bean
    • setConfig

      void setConfig(T config)
      Sets the initial config bean.
    • onConfigSet

      default void onConfigSet(BeanChanges changes)
      Called the first time the configuration is set. Default behavior calls the onConfigChanged() method.
      Parameters:
      changes - the changes to the bean
    • onConfigChanged

      default void onConfigChanged(BeanChanges changes)
      Called any time the configuration is changed after the initial onConfigSet() is called. If onConfigSet() is not overridden, the default implementation calls this method when setting the initial configuration.
      Parameters:
      changes - the changes to the bean