Interface Configuration

  • All Known Implementing Classes:
    MapBasedConfiguration

    public interface Configuration
    A component which provides for the registration, retrieval and deregistration of objects related to library module configuration.

    An implementation may manage the registration, retrieval and deregistration of objects using a variety of mechanisms, such as internal in-memory storage, JNDI or a database.

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T> T deregister​(Class<T> configClass, String partitionName)
      Deregister a configuration instance.
      <T> T get​(Class<T> configClass, String partitionName)
      Obtain the registered configuration instance.
      <T,​I extends T>
      void
      register​(Class<T> configClass, I configInstance, String partitionName)
      Register a configuration instance.
    • Method Detail

      • get

        <T> T get​(Class<T> configClass,
                  String partitionName)
        Obtain the registered configuration instance.
        Type Parameters:
        T - the type of configuration being retrieved, typically an interface
        Parameters:
        configClass - the configuration class identifier, typically an interface
        partitionName - the partition name to use
        Returns:
        the instance of the registered configuration interface, or null
      • register

        <T,​I extends T> void register​(Class<T> configClass,
                                            I configInstance,
                                            String partitionName)
        Register a configuration instance.
        Type Parameters:
        T - the type of configuration being registered, typically an interface
        I - the configuration implementation being registered, which will be an instance of T
        Parameters:
        configClass - the type of configuration class being registered, typically an interface
        configInstance - the configuration implementation instance being registered
        partitionName - the partition name to use
      • deregister

        <T> T deregister​(Class<T> configClass,
                         String partitionName)
        Deregister a configuration instance.
        Type Parameters:
        T - the type of configuration being deregistered, typically an interface
        Parameters:
        configClass - the type of configuration class being deregistered , typically an interface
        partitionName - the partition name to use
        Returns:
        the configuration implementation instance which was deregistered, or null