Interface CommonConfigStore<T extends AbstractCommonConfig>


  • public interface CommonConfigStore<T extends AbstractCommonConfig>
    A store of client/endpoint config
    Since:
    04-Dec-2013
    Author:
    alessio.soldano@jboss.com
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T getConfig​(String name)
      Retrieves a config by name from the loaded collection
      Collection<T> getConfigs()
      Returns the loaded config collection
      T getWrapperConfig()
      Returns current wrapper config
      void register​(T config)
      Registers a config in the store; the new config will affect runtime the first time the store is reloaded.
      void reload()
      Reloads the store, which involves iterating over the registered configs and creating a collection that is returned when calling getConfig(..) / getConfigs().
      void setWrapperConfig​(T config, boolean reload)
      Sets a wrapper config, to be merged with any registered config.
      void unload()
      Unloads the store, cleaning up the loaded collection.
      void unregister​(T config)
      Unregisters a config in the store; the runtime will be affected the first time the store is reloaded.
    • Method Detail

      • register

        void register​(T config)
        Registers a config in the store; the new config will affect runtime the first time the store is reloaded.
        Parameters:
        config - Registers a config in the store
      • unregister

        void unregister​(T config)
        Unregisters a config in the store; the runtime will be affected the first time the store is reloaded.
        Parameters:
        config - Unregisters a config in the store
      • reload

        void reload()
        Reloads the store, which involves iterating over the registered configs and creating a collection that is returned when calling getConfig(..) / getConfigs().
      • unload

        void unload()
        Unloads the store, cleaning up the loaded collection.
      • setWrapperConfig

        void setWrapperConfig​(T config,
                              boolean reload)
        Sets a wrapper config, to be merged with any registered config.
        Parameters:
        config - Sets a wrapper config
        reload - Whether to reload the store after having set the wrapper or not
      • getWrapperConfig

        T getWrapperConfig()
        Returns current wrapper config
        Returns:
        Returns current wrapper config
      • getConfig

        T getConfig​(String name)
        Retrieves a config by name from the loaded collection
        Parameters:
        name - Retrieves a config by name
        Returns:
        The matching config
      • getConfigs

        Collection<T> getConfigs()
        Returns the loaded config collection
        Returns:
        the config collection