Class DefaultAPIProvider

  • All Implemented Interfaces:
    APIProvider

    public class DefaultAPIProvider
    extends Object
    implements APIProvider
    Simple API Provider which keeps internally Maps interface implementations as singletons
    Author:
    Jeremy Unruh
    • Constructor Detail

      • DefaultAPIProvider

        public DefaultAPIProvider()
    • Method Detail

      • initialize

        public void initialize()
        Called after the APIProvider is constructed. This allows the provider to pre-initialize or bind any interface implementations if desired
        Specified by:
        initialize in interface APIProvider
      • get

        public <T> T get​(Class<T> api)
        Gets the implementation for the specified interface type
        Specified by:
        get in interface APIProvider
        Type Parameters:
        T - the Openstack4j API type
        Parameters:
        api - the API interface
        Returns:
        the implementation for T