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 StringDEFAULT_ENDPOINT_TEMPLATE
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static StringcreateEndpoint(Service service, Region region)Deprecated.Please usecreateEndpoint(Service, Region, Predicate)static StringcreateEndpoint(Service service, Region region, Predicate<com.oracle.bmc.http.client.HttpProviderCapability> httpProviderCapabilityPredicate)Creates the service endpoint using theDefaultEndpointConfigurationmethod.static StringcreateEndpoint(Service service, String regionId, Realm realm)Creates the service endpoint using theDefaultEndpointConfigurationmethod.static StringcreateEndpoint(Service service, String regionId, Realm realm, Predicate<com.oracle.bmc.http.client.HttpProviderCapability> httpProviderCapabilityPredicate)Creates the service endpoint using theDefaultEndpointConfigurationmethod.static StringgetRealmSpecificEndpointTemplate(String regionId, Service service, Realm realm)static StringgetServiceEndpointTemplateToUse(String regionId, Service service, Realm realm)static voidoverrideRegionId(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, @Nonnull Predicate<com.oracle.bmc.http.client.HttpProviderCapability> httpProviderCapabilityPredicate)
Creates the service endpoint using theDefaultEndpointConfigurationmethod.- Parameters:
service- The serviceregionId- The regionIdrealm- The realm this region belongs to.httpProviderCapabilityPredicate- a predicate that checks whether the HTTP provider has a certain capability- Returns:
- The endpoint (protocol + FQDN) for this service.
-
createEndpoint
public static String createEndpoint(@Nonnull Service service, @Nonnull String regionId, @Nonnull Realm realm)
Creates the service endpoint using theDefaultEndpointConfigurationmethod.- 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
@Deprecated public static String createEndpoint(@Nonnull Service service, @Nonnull Region region)
Deprecated.Please usecreateEndpoint(Service, Region, Predicate)Creates the service endpoint using theDefaultEndpointConfigurationmethod.- Parameters:
service- The serviceregion- The region- Returns:
- The endpoint (protocol + FQDN) for this service.
-
createEndpoint
public static String createEndpoint(@Nonnull Service service, @Nonnull Region region, @Nonnull Predicate<com.oracle.bmc.http.client.HttpProviderCapability> httpProviderCapabilityPredicate)
Creates the service endpoint using theDefaultEndpointConfigurationmethod.- Parameters:
service- The serviceregion- The regionhttpProviderCapabilityPredicate- a predicate that checks whether the HTTP provider has a certain capability- 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.
-
-