All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ibm.optim.oaas.client.job.JobClientFactory.html Maven / Gradle / Ivy

The newest version!






JobClientFactory (Java Client for DOcplexcloud 1.0 API)











com.ibm.optim.oaas.client.job

Class JobClientFactory



  • public class JobClientFactory
    extends Object
    Factory to create and configure job clients.
    • Field Detail

      • BLUEMIX_SERVICE_LABEL

        public static final String BLUEMIX_SERVICE_LABEL
        This is the text ("docplexcloud") that is used to search for a definition of the service in Bluemix when no name is provided.
        See Also:
        Constant Field Values
    • Constructor Detail

      • JobClientFactory

        public JobClientFactory()
    • Method Detail

      • createDefault

        public static JobClient createDefault(String baseURL,
                              String clientid)
        Creates a default job client to connect to the given base URL using the given client ID. The default job client uses the default HTTP client.
        Parameters:
        baseURL - The base URL.
        clientid - The client ID of the API key.
        Returns:
        The configured job client.
      • custom

        public static JobClientBuilder custom(String baseURL,
                              String clientid)
        Returns a builder to configure the job client.
        Parameters:
        baseURL - The base URL.
        clientid - The client ID of the API key.
        Returns:
        The builder.
      • custom

        public static JobClientBuilder custom(String baseURL,
                              String clientid,
                              String secret)
        Returns a builder to configure the job client.
        Parameters:
        baseURL - The base URL.
        clientid - The client ID of the API key.
        secret - The client secret of the API key.
        Returns:
        The builder.
      • createDefault

        public static JobClient createDefault(String baseURL,
                              String clientid,
                              String secret)
        Creates a default job client to connect to the given base URL using the given client ID and client secret. The default job client uses the default HTTP client.
        Parameters:
        baseURL - The server URL.
        clientid - The client ID of the API key.
        secret - The client secret of the API key.
        Returns:
        The configured job client.
      • createDefaultFromBluemix

        public static JobClient createDefaultFromBluemix()
                                                  throws OaasException
        Creates a default job client to connect to the IBM Decision Optimization service by looking up the service with the label starting with BLUEMIX_SERVICE_LABEL in the VCAP_SERVICES. The default job client uses the default HTTP client.
        Returns:
        The configured job client.
        Throws:
        OaasException - if the service credentials can not be found.
        See Also:
        createDefaultFromBluemix(String)
      • createDefaultFromBluemix

        public static JobClient createDefaultFromBluemix(String serviceName)
                                                  throws OaasException
        Creates a default job client to connect to the IBM Decision Optimization service by looking up the service name in the VCAP_SERVICES. The default job client uses the default HTTP client.
        Parameters:
        serviceName - The name of the IBM Decision Optimization service to be used.
        Returns:
        The configured job client.
        Throws:
        OaasException - if the service credentials can not be found.

        The service name is the name that was given to the service and bound to the Bluemix application.

      • customFromBluemix

        public static JobClientBuilder customFromBluemix(String serviceName)
                                                  throws OaasException
        Returns a builder to configure the job client.
        Parameters:
        serviceName - The name of the IBM Decision Optimization service to be used.
        Returns:
        The builder.
        Throws:
        OaasException - if the service credentials can not be found.

        The service name is the name that was given to the service and bound to the Bluemix application.

Copyright © 2015–2017 IBM Corporation. Licensed under the Apache License, Version 2.0.





© 2015 - 2025 Weber Informatics LLC | Privacy Policy