Class Configurable<TConfig>

java.lang.Object
com.seeq.link.sdk.Configurable<TConfig>
Type Parameters:
TConfig - The class for the top-level configuration object.

public abstract class Configurable<TConfig> extends Object
Facilitates a consistent implementation of configuration aspects of a connector or agent.
  • Constructor Details

    • Configurable

      public Configurable()
  • Method Details

    • getName

      public abstract String getName()
    • getConfigService

      public ConfigService getConfigService()
    • getConfig

      protected TConfig getConfig()
    • initialize

      protected void initialize(ConfigService configService, ConfigObject[] supportedConfigObjects) throws IOException
      Initializes the Object with information necessary to load/save configuration objects.
      Parameters:
      configService - The config service, as it was passed in by a higher-level coordinator.
      supportedConfigObjects - An array of ConfigObject instances that represent the possible Object types that can be successfully retrieved from the store. If the persisted Object type does not match anything in the list, then the first item in the array is passed back (being effectively a means to have a 'default' config).
      Throws:
      IOException - Thrown if configuration file could not be successfully deserialized.
    • destroy

      public void destroy()
    • migrateConfig

      protected TConfig migrateConfig(Object configObject)
    • saveConfig

      public void saveConfig()
      Saves the current in-memory configuration to the configuration store via the ConfigService.
    • loadConfig

      protected void loadConfig(String name) throws IOException
      Throws:
      IOException
    • onConfigChanged

      protected void onConfigChanged()