Class 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.

    • Method Detail

      • createEndpoint

        public static String createEndpoint​(@Nonnull
                                            Service service,
                                            @Nonnull
                                            String regionId,
                                            @Nonnull
                                            Realm realm)
        Creates the service endpoint using the DefaultEndpointConfiguration method.
        Parameters:
        service - The service
        regionId - The regionId
        realm - 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 the DefaultEndpointConfiguration method.
        Parameters:
        service - The service
        region - 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 from Region.getRegionId().
        overrideRegionId - The alternative regionId to use.