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.
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_ENDPOINT_TEMPLATE |
Modifier and Type | Method and Description |
---|---|
static String |
createEndpoint(@NonNull Service service,
@NonNull Region region)
Creates the service endpoint using the
DefaultEndpointConfiguration
method. |
static String |
createEndpoint(@NonNull Service service,
@NonNull String regionId,
@NonNull Realm realm)
Creates the service endpoint using the
DefaultEndpointConfiguration
method. |
static void |
overrideRegionId(@NonNull String regionId,
@NonNull String overrideRegionId)
Temporary ability to override the region for a given regionId.
|
public static final String DEFAULT_ENDPOINT_TEMPLATE
public static String createEndpoint(@NonNull @NonNull Service service, @NonNull @NonNull String regionId, @NonNull @NonNull Realm realm)
Creates the service endpoint using the DefaultEndpointConfiguration
method.
service
- The serviceregionId
- The regionIdrealm
- The realm this region belongs to.public static String createEndpoint(@NonNull @NonNull Service service, @NonNull @NonNull Region region)
Creates the service endpoint using the DefaultEndpointConfiguration
method.
service
- The serviceregion
- The regionpublic static void overrideRegionId(@NonNull @NonNull String regionId, @NonNull @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.
regionId
- The value obtained from Region.getRegionId()
.overrideRegionId
- The alternative regionId to use.Copyright © 2016–2022. All rights reserved.