Package com.oracle.bmc.internal
Class EndpointBuilder
- java.lang.Object
-
- com.oracle.bmc.internal.EndpointBuilder
-
public class EndpointBuilder extends Object
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
Fields Modifier and Type Field Description static String
DEFAULT_ENDPOINT_TEMPLATE
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
createEndpoint(Service service, Region region)
Creates the service endpoint using theDefaultEndpointConfiguration
method.static String
createEndpoint(Service service, String regionId, Realm realm)
Creates the service endpoint using theDefaultEndpointConfiguration
method.static String
getRealmSpecificEndpointTemplate(String regionId, Service service, Realm realm)
static String
getServiceEndpointTemplateToUse(String regionId, Service service, Realm realm)
static void
overrideRegionId(String regionId, String overrideRegionId)
Temporary ability to override the region for a given regionId.
-
-
-
Field Detail
-
DEFAULT_ENDPOINT_TEMPLATE
public static final String DEFAULT_ENDPOINT_TEMPLATE
- See Also:
- Constant Field Values
-
-
Method Detail
-
createEndpoint
public static String createEndpoint(@Nonnull Service service, @Nonnull String regionId, @Nonnull Realm realm)
Creates the service endpoint using theDefaultEndpointConfiguration
method.- Parameters:
service
- The serviceregionId
- The regionIdrealm
- The realm this region belongs to.- Returns:
- The endpoint (protocol + FQDN) for this service.
-
getRealmSpecificEndpointTemplate
public static String getRealmSpecificEndpointTemplate(String regionId, Service service, Realm realm)
-
getServiceEndpointTemplateToUse
public static String getServiceEndpointTemplateToUse(String regionId, Service service, Realm realm)
-
createEndpoint
public static String createEndpoint(@Nonnull Service service, @Nonnull Region region)
Creates the service endpoint using theDefaultEndpointConfiguration
method.- Parameters:
service
- The serviceregion
- The region- Returns:
- The endpoint (protocol + FQDN) for this service.
-
overrideRegionId
public static void overrideRegionId(@Nonnull String regionId, @Nonnull 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
- The value obtained fromRegion.getRegionId()
.overrideRegionId
- The alternative regionId to use.
-
-