Top Description Fields Constructors Methods
com.oracle.bmc.internal

public Class EndpointBuilder

extends Object
Class Inheritance
Imports
java.util.HashMap, .Locale, .Map, com.oracle.bmc.Realm, .Region, .Service, com.oracle.bmc.http.client.Options, com.oracle.bmc.util.internal.StringUtils, jakarta.annotation.Nonnull

EndpointBuilder provides a wrapper to construct the appropriate endpoint for a service. The service may override the endpoint template, but if not, a default template will be used.

Field Summary

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

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static String

Returns:

The endpoint (protocol + FQDN) for this service.
createEndpoint
(Service
The service
service
,
String
The regionId
regionId
,
Realm
The realm this region belongs to.
realm
)

Creates the service endpoint using the DefaultEndpointConfiguration method.

public static String

Returns:

The endpoint (protocol + FQDN) for this service.
createEndpoint
(Service
The service
service
,
Region
The region
region
)

Creates the service endpoint using the DefaultEndpointConfiguration method.

private static String
getEndpointServiceNameFromTemplate(String serviceEndpointTemplate)

public static String
public static String
public static void
overrideRegionId(String
The value obtained from Region#getRegionId().
regionId
,
String
The alternative regionId to use.
overrideRegionId
)

Temporary ability to override the region for a given regionId.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_ENDPOINT_TEMPLATEback to summary
public static final String DEFAULT_ENDPOINT_TEMPLATE
ENDPOINT_TEMPLATE_FOR_REGION_WITH_DOTback to summary
private static final String ENDPOINT_TEMPLATE_FOR_REGION_WITH_DOT
LOGback to summary
private static final Logger LOG
OVERRIDE_REGION_IDSback to summary
private static final Map<String, String> OVERRIDE_REGION_IDS

Constructor Detail

EndpointBuilderback to summary
private EndpointBuilder()

Method Detail

createEndpointback to summary
public static String createEndpoint(Service service, String regionId, Realm realm)

Creates the service endpoint using the DefaultEndpointConfiguration method.

Parameters
service:Service

The service

regionId:String

The regionId

realm:Realm

The realm this region belongs to.

Returns:String

The endpoint (protocol + FQDN) for this service.

createEndpointback to summary
public static String createEndpoint(Service service, Region region)

Creates the service endpoint using the DefaultEndpointConfiguration method.

Parameters
service:Service

The service

region:Region

The region

Returns:String

The endpoint (protocol + FQDN) for this service.

getEndpointServiceNameFromTemplateback to summary
private static String getEndpointServiceNameFromTemplate(String serviceEndpointTemplate)
getRealmSpecificEndpointTemplateback to summary
public static String getRealmSpecificEndpointTemplate(String regionId, Service service, Realm realm)
getServiceEndpointTemplateToUseback to summary
public static String getServiceEndpointTemplateToUse(String regionId, Service service, Realm realm)
overrideRegionIdback to summary
public static void overrideRegionId(String regionId, String overrideRegionId)

Temporary ability to override the region for a given regionId.

This will most likely be removed at a later point in time. It is not intended for use outside of the SDK.

Parameters
regionId:String

The value obtained from Region#getRegionId().

overrideRegionId:String

The alternative regionId to use.