Class OSFactory<T extends 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 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 API
        perspective - 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 API
        config - 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 API
        perspective - the current endpoint perspective to use
        config - 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 API
        perspective - the current endpoint perspective to use
        provider - the cloud provider
        config - 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 API
        perspective - 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 API
        config - 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 API
        perspective - the current endpoint perspective to use
        config - 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 API
        perspective - the current endpoint perspective to use
        provider - the cloud provider
        config - 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