Package org.openstack4j.openstack
Class OSFactory<T extends OSFactory<T>>
- java.lang.Object
-
- org.openstack4j.openstack.OSFactory<T>
-
public abstract class OSFactory<T extends OSFactory<T>> extends Object
A Factory which sets up the APIs to be used a previously non-expired authorization or new authorization.- Author:
- Jeremy Unruh
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IOSClientBuilder.V2builderV2()Creates builder for OpenStack V2 based authenticationstatic IOSClientBuilder.V3builderV3()Creates builder for OpenStack V3 based authenticationstatic OSClient.OSClientV2clientFromAccess(Access access)Skips Authentication and created the API around a previously cached Access object.static OSClient.OSClientV2clientFromAccess(Access access, Facing perspective)Skips Authentication and created the API around a previously cached Access object.static OSClient.OSClientV2clientFromAccess(Access access, Facing perspective, CloudProvider provider, Config config)Skips Authentication and created the API around a previously cached Access object.static OSClient.OSClientV2clientFromAccess(Access access, Facing perspective, Config config)Skips Authentication and created the API around a previously cached Access object.static OSClient.OSClientV2clientFromAccess(Access access, Config config)Skips Authentication and created the API around a previously cached Access object.static OSClient.OSClientV3clientFromToken(Token token)Skips Authentication and created the API around a previously cached Token object.static OSClient.OSClientV3clientFromToken(Token token, Facing perspective)Skips Authentication and created the API around a previously cached Token object.static OSClient.OSClientV3clientFromToken(Token token, Facing perspective, CloudProvider provider, Config config)Skips Authentication and created the API around a previously cached Token object.static OSClient.OSClientV3clientFromToken(Token token, Facing perspective, Config config)Skips Authentication and created the API around a previously cached Token object.static OSClient.OSClientV3clientFromToken(Token token, Config config)Skips Authentication and created the API around a previously cached Token object.static voidenableHttpLoggingFilter(boolean enabled)Globally enables or disables verbose HTTP Request and Response logging useful for debugging
-
-
-
Method Detail
-
clientFromToken
public static OSClient.OSClientV3 clientFromToken(Token token)
Skips Authentication and created the API around a previously cached Token object. This can be useful in multi-threaded environments or scenarios where a client should not be re-authenticated due to a token lasting 24 hours.- Parameters:
token- an authorized token entity which is to be used to create the API- Returns:
- the OSClient
-
clientFromToken
public static OSClient.OSClientV3 clientFromToken(Token token, Facing perspective)
Skips Authentication and created the API around a previously cached Token object. This can be useful in multi-threaded environments or scenarios where a client should not be re-authenticated due to a token lasting 24 hours- Parameters:
token- an authorized token entity which is to be used to create the APIperspective- the current endpoint perspective to use- Returns:
- the OSClient
-
clientFromToken
public static OSClient.OSClientV3 clientFromToken(Token token, Config config)
Skips Authentication and created the API around a previously cached Token object. This can be useful in multi-threaded environments or scenarios where a client should not be re-authenticated due to a token lasting 24 hours- Parameters:
token- an authorized token entity which is to be used to create the APIconfig- OpenStack4j configuration options- Returns:
- the OSClient
-
clientFromToken
public static OSClient.OSClientV3 clientFromToken(Token token, Facing perspective, Config config)
Skips Authentication and created the API around a previously cached Token object. This can be useful in multi-threaded environments or scenarios where a client should not be re-authenticated due to a token lasting 24 hours- Parameters:
token- an authorized token entity which is to be used to create the APIperspective- the current endpoint perspective to useconfig- OpenStack4j configuration options- Returns:
- the OSClient
-
clientFromToken
public static OSClient.OSClientV3 clientFromToken(Token token, Facing perspective, CloudProvider provider, Config config)
Skips Authentication and created the API around a previously cached Token object. This can be useful in multi-threaded environments or scenarios where a client should not be re-authenticated due to a token lasting 24 hours- Parameters:
token- an authorized token entity which is to be used to create the APIperspective- the current endpoint perspective to useprovider- the cloud providerconfig- OpenStack4j configuration options- Returns:
- the OSClient
-
clientFromAccess
public static OSClient.OSClientV2 clientFromAccess(Access access)
Skips Authentication and created the API around a previously cached Access object. This can be useful in multi-threaded environments or scenarios where a client should not be re-authenticated due to a token lasting 24 hours- Parameters:
access- an authorized access entity which is to be used to create the API- Returns:
- the OSCLient
-
clientFromAccess
public static OSClient.OSClientV2 clientFromAccess(Access access, Facing perspective)
Skips Authentication and created the API around a previously cached Access object. This can be useful in multi-threaded environments or scenarios where a client should not be re-authenticated due to a token lasting 24 hours- Parameters:
access- an authorized access entity which is to be used to create the APIperspective- the current endpoint perspective to use- Returns:
- the OSCLient
-
clientFromAccess
public static OSClient.OSClientV2 clientFromAccess(Access access, Config config)
Skips Authentication and created the API around a previously cached Access object. This can be useful in multi-threaded environments or scenarios where a client should not be re-authenticated due to a token lasting 24 hours- Parameters:
access- an authorized access entity which is to be used to create the APIconfig- OpenStack4j configuration options- Returns:
- the OSCLient
-
clientFromAccess
public static OSClient.OSClientV2 clientFromAccess(Access access, Facing perspective, Config config)
Skips Authentication and created the API around a previously cached Access object. This can be useful in multi-threaded environments or scenarios where a client should not be re-authenticated due to a token lasting 24 hours- Parameters:
access- an authorized access entity which is to be used to create the APIperspective- the current endpoint perspective to useconfig- OpenStack4j configuration options- Returns:
- the OSCLient
-
clientFromAccess
public static OSClient.OSClientV2 clientFromAccess(Access access, Facing perspective, CloudProvider provider, Config config)
Skips Authentication and created the API around a previously cached Access object. This can be useful in multi-threaded environments or scenarios where a client should not be re-authenticated due to a token lasting 24 hours- Parameters:
access- an authorized access entity which is to be used to create the APIperspective- the current endpoint perspective to useprovider- the cloud providerconfig- OpenStack4j configuration options- Returns:
- the OSCLient
-
enableHttpLoggingFilter
public static void enableHttpLoggingFilter(boolean enabled)
Globally enables or disables verbose HTTP Request and Response logging useful for debugging- Parameters:
enabled- true to enable, false to enable
-
builderV2
public static IOSClientBuilder.V2 builderV2()
Creates builder for OpenStack V2 based authentication- Returns:
- V2 Authentication builder
-
builderV3
public static IOSClientBuilder.V3 builderV3()
Creates builder for OpenStack V3 based authentication- Returns:
- V3 Authentication builder
-
-