
com.ibm.optim.oaas.client.job.JobClientFactory.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api-java-client Show documentation
Show all versions of api-java-client Show documentation
Java client API for DOCplexCloud, version 1.0.257
The newest version!
JobClientFactory (Java Client for DOcplexcloud 1.0 API)
com.ibm.optim.oaas.client.job
Class JobClientFactory
- java.lang.Object
-
- com.ibm.optim.oaas.client.job.JobClientFactory
-
public class JobClientFactory
extends Object
Factory to create and configure job clients.
-
-
Field Summary
Fields
Modifier and Type
Field and Description
static 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.
-
Constructor Summary
Constructors
Constructor and Description
JobClientFactory()
-
Method Summary
Methods
Modifier and Type
Method and Description
static JobClient
createDefault(String baseURL,
String clientid)
Creates a default job client to connect to the given base URL using the
given client ID.
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.
static JobClient
createDefaultFromBluemix()
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.
static JobClient
createDefaultFromBluemix(String serviceName)
Creates a default job client to connect to the IBM Decision Optimization service by looking up the
service name in the VCAP_SERVICES.
static JobClientBuilder
custom(String baseURL,
String clientid)
Returns a builder to configure the job client.
static JobClientBuilder
custom(String baseURL,
String clientid,
String secret)
Returns a builder to configure the job client.
static JobClientBuilder
customFromBluemix()
Returns a builder to configure the job client by looking for an IBM Decision Optimization
service with the label starting with BLUEMIX_SERVICE_LABEL
in the VCAP_SERVICES.
static JobClientBuilder
customFromBluemix(String serviceName)
Returns a builder to configure the job client.
-
-
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
-
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.
-
customFromBluemix
public static JobClientBuilder customFromBluemix()
throws OaasException
Returns a builder to configure the job client by looking for an IBM Decision Optimization
service with the label starting with BLUEMIX_SERVICE_LABEL
in the VCAP_SERVICES.
- Returns:
- The builder.
- Throws:
OaasException
- if the service credentials can not be found.- See Also:
customFromBluemix(String)
Copyright © 2015–2017 IBM Corporation. Licensed under the Apache License, Version 2.0.
© 2015 - 2025 Weber Informatics LLC | Privacy Policy