public class OSClientFactory extends Object
OSClient objects ready for use.| Constructor and Description |
|---|
OSClientFactory(ApiAccessConfig apiAccessConfig)
Creates an
OSClientFactory with a StandardOSClientCreator
creating clients according to the given configuration. |
OSClientFactory(ApiAccessConfig apiAccessConfig,
com.elastisys.scale.commons.openstack.OSClientFactory.OSClientCreator creator)
Creates an
OSClientFactory with a custom OSClientCreator. |
| Modifier and Type | Method and Description |
|---|---|
org.openstack4j.api.OSClient<?> |
authenticatedClient()
Returns an OpenStack API client, authenticated and configured according
to the
ApiAccessConfig provided at construction-time. |
ApiAccessConfig |
getApiAccessConfig()
Returns the API access configuration that describes how to authenticate
with and communicate over the OpenStack API.
|
public OSClientFactory(ApiAccessConfig apiAccessConfig)
OSClientFactory with a StandardOSClientCreator
creating clients according to the given configuration.apiAccessConfig - API access configuration that describes how to authenticate
with and communicate over the OpenStack API.public OSClientFactory(ApiAccessConfig apiAccessConfig, com.elastisys.scale.commons.openstack.OSClientFactory.OSClientCreator creator)
OSClientFactory with a custom OSClientCreator.apiAccessConfig - API access configuration that describes how to authenticate
with and communicate over the OpenStack API.public org.openstack4j.api.OSClient<?> authenticatedClient()
ApiAccessConfig provided at construction-time.
Note: the returned OSClient is bound to the calling thread
(since Openstack4j uses thread-scoped sessions) and should therefore
never be used by a different thread. If another thread needs to make use
of an OSClient, pass the OSClientFactory to that thread
and make a new call to authenticatedClient().OSClient ready for use.public ApiAccessConfig getApiAccessConfig()
Copyright © 2011–2016 elastisys. All rights reserved.