Class DefaultAPIProvider
- java.lang.Object
-
- org.openstack4j.openstack.provider.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 Summary
Constructors Constructor Description DefaultAPIProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Tget(Class<T> api)Gets the implementation for the specified interface typevoidinitialize()Called after the APIProvider is constructed.
-
-
-
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:
initializein interfaceAPIProvider
-
get
public <T> T get(Class<T> api)
Gets the implementation for the specified interface type- Specified by:
getin interfaceAPIProvider- Type Parameters:
T- the Openstack4j API type- Parameters:
api- the API interface- Returns:
- the implementation for T
-
-