Top Description Inners Fields Constructors Methods
com.oracle.bmc

public Class Services

extends Object
Class Inheritance
Imports
org.slf4j.Logger, java.util.Collections, .HashMap, .Map, com.oracle.bmc.util.internal.Validate

Factory class to create new Service instances.

This serves to ensure conflicting definitions of services don't get created.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
public static class

Field Summary

Modifier and TypeField and Description
private static final Logger
private static final Map<String, String>
private static final Map<String, Service>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static Service

Returns:

A Service instance.
create
(final String
The unique service name.
serviceName
,
final String
The endpoint prefix.
serviceEndpointPrefix
)
Deprecated Use serviceBuilder() instead

Create a new service definition.

private static synchronized Service
create(final String serviceName, final String serviceEndpointPrefix, final String serviceEndpointTemplate, final String endpointServiceName)

public static Service

Returns:

service instance
getServiceByName
(final String
service name should be UPPER CASE.
serviceName
)

Get Service instance based on service name.

public static Services.ServiceBuilder
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGback to summary
private static final Logger LOG
REALM_SPECIFIC_ENDPOINT_TEMPLATE_MAPback to summary
private static final Map<String, String> REALM_SPECIFIC_ENDPOINT_TEMPLATE_MAP
SERVICE_CACHEback to summary
private static final Map<String, Service> SERVICE_CACHE

Constructor Detail

Servicesback to summary
public Services()

Method Detail

createback to summary
public static Service create(final String serviceName, final String serviceEndpointPrefix)

Deprecated

Use serviceBuilder() instead

Create a new service definition. If the service has already been registered with different values, an IllegalArgumentException will be raised. If the service has already been registered, the existing definition will be returned.

Parameters
serviceName:String

The unique service name.

serviceEndpointPrefix:String

The endpoint prefix.

Returns:Service

A Service instance.

Annotations
@Deprecated
createback to summary
private static synchronized Service create(final String serviceName, final String serviceEndpointPrefix, final String serviceEndpointTemplate, final String endpointServiceName)
getServiceByNameback to summary
public static Service getServiceByName(final String serviceName)

Get Service instance based on service name.

Parameters
serviceName:String

service name should be UPPER CASE.

Returns:Service

service instance

serviceBuilderback to summary
public static Services.ServiceBuilder serviceBuilder()
com.oracle.bmc back to summary

private final Class Services.BasicService

extends Object
implements Service
Class Inheritance
All Implemented Interfaces
com.oracle.bmc.Service

Field Summary

Modifier and TypeField and Description
private final String
private final String
private final String
private final String

Constructor Summary

AccessConstructor and Description
public
BasicService(String serviceName, String serviceEndpointPrefix, String serviceEndpointTemplate, String endpointServiceName)

Method Summary

Modifier and TypeMethod and Description
public void
addServiceEndpointTemplateForRealm(String
Key in the map
realmId
,
String
Value in the map
endpoint
)

Implements com.oracle.bmc.Service.addServiceEndpointTemplateForRealm.

This method adds service endpoint templates for the realm to a map

public boolean
equals(final Object
the reference object with which to compare.
o
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public String
getEndpointServiceName()

Implements com.oracle.bmc.Service.getEndpointServiceName.

The service endpoint name that will be used only for dotted regions if set by the service.

public String
getServiceEndpointPrefix()

Implements com.oracle.bmc.Service.getServiceEndpointPrefix.

The service endpoint prefix that will be used, ex "iaas" for "https://iaas.us-phoenix-1.oraclecloud.com".

public String
getServiceEndpointTemplate()

Implements com.oracle.bmc.Service.getServiceEndpointTemplate.

The service endpoint template that will be used, ex "{serviceEndpointPrefix}.{region}.service.oci.oraclecloud.com".

public Map<String, String>
getServiceEndpointTemplateForRealmMap()

Implements com.oracle.bmc.Service.getServiceEndpointTemplateForRealmMap.

The map of all realm-specific service endpoint templates with realmId as key and endpoint template for corresponding realmId as the value ex "oc1={serviceParameter}{serviceEndpointPrefix}.{region}.{serviceSecondLevelDomain}".

public String
getServiceName()

Implements com.oracle.bmc.Service.getServiceName.

The unique service name, ex "BLOCKSTORAGE".

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

endpointServiceNameback to summary
private final String endpointServiceName
serviceEndpointPrefixback to summary
private final String serviceEndpointPrefix
serviceEndpointTemplateback to summary
private final String serviceEndpointTemplate
serviceNameback to summary
private final String serviceName

Constructor Detail

BasicServiceback to summary
public BasicService(String serviceName, String serviceEndpointPrefix, String serviceEndpointTemplate, String endpointServiceName)
Annotations
@java.beans.ConstructorProperties

Method Detail

addServiceEndpointTemplateForRealmback to summary
public void addServiceEndpointTemplateForRealm(String realmId, String endpoint)

Implements com.oracle.bmc.Service.addServiceEndpointTemplateForRealm.

Doc from com.oracle.bmc.Service.addServiceEndpointTemplateForRealm.

This method adds service endpoint templates for the realm to a map

Parameters
realmId:String

Key in the map

endpoint:String

Value in the map

equalsback to summary
public boolean equals(final Object o)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
o:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

getEndpointServiceNameback to summary
public String getEndpointServiceName()

Implements com.oracle.bmc.Service.getEndpointServiceName.

Doc from com.oracle.bmc.Service.getEndpointServiceName.

The service endpoint name that will be used only for dotted regions if set by the service. {service} in "https://{service}.{region}". The service endpoint template (if specified) will be ignored in this case.

getServiceEndpointPrefixback to summary
public String getServiceEndpointPrefix()

Implements com.oracle.bmc.Service.getServiceEndpointPrefix.

Doc from com.oracle.bmc.Service.getServiceEndpointPrefix.

The service endpoint prefix that will be used, ex "iaas" for "https://iaas.us-phoenix-1.oraclecloud.com".

getServiceEndpointTemplateback to summary
public String getServiceEndpointTemplate()

Implements com.oracle.bmc.Service.getServiceEndpointTemplate.

Doc from com.oracle.bmc.Service.getServiceEndpointTemplate.

The service endpoint template that will be used, ex "{serviceEndpointPrefix}.{region}.service.oci.oraclecloud.com".

This overrides the template used in DefaultEndpointConfiguration, but can still use the same variables.

getServiceEndpointTemplateForRealmMapback to summary
public Map<String, String> getServiceEndpointTemplateForRealmMap()

Implements com.oracle.bmc.Service.getServiceEndpointTemplateForRealmMap.

Doc from com.oracle.bmc.Service.getServiceEndpointTemplateForRealmMap.

The map of all realm-specific service endpoint templates with realmId as key and endpoint template for corresponding realmId as the value ex "oc1={serviceParameter}{serviceEndpointPrefix}.{region}.{serviceSecondLevelDomain}".

This overrides the template used in DefaultEndpointConfiguration, but can still use the same variables.

getServiceNameback to summary
public String getServiceName()

Implements com.oracle.bmc.Service.getServiceName.

Doc from com.oracle.bmc.Service.getServiceName.

The unique service name, ex "BLOCKSTORAGE". Must not be null.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

com.oracle.bmc back to summary

public Class Services.ServiceBuilder

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private String
private String
private String
private String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public Services.ServiceBuilder
public Service
public Services.ServiceBuilder
endpointServiceName(String endpointServiceName)

public Services.ServiceBuilder
serviceEndpointPrefix(String serviceEndpointPrefix)

public Services.ServiceBuilder
serviceEndpointTemplate(String serviceEndpointTemplate)

public Services.ServiceBuilder
serviceName(String serviceName)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

endpointServiceNameback to summary
private String endpointServiceName
serviceEndpointPrefixback to summary
private String serviceEndpointPrefix
serviceEndpointTemplateback to summary
private String serviceEndpointTemplate
serviceNameback to summary
private String serviceName

Constructor Detail

ServiceBuilderback to summary
pack-priv ServiceBuilder()

Method Detail

addServiceEndpointTemplateForRealmback to summary
public Services.ServiceBuilder addServiceEndpointTemplateForRealm(String realmId, String endpoint)
buildback to summary
public Service build()
endpointServiceNameback to summary
public Services.ServiceBuilder endpointServiceName(String endpointServiceName)
serviceEndpointPrefixback to summary
public Services.ServiceBuilder serviceEndpointPrefix(String serviceEndpointPrefix)
serviceEndpointTemplateback to summary
public Services.ServiceBuilder serviceEndpointTemplate(String serviceEndpointTemplate)
serviceNameback to summary
public Services.ServiceBuilder serviceName(String serviceName)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object