Class StaticClientEndpointProvider

java.lang.Object
software.amazon.awssdk.core.internal.StaticClientEndpointProvider
All Implemented Interfaces:
ClientEndpointProvider

@SdkInternalApi public class StaticClientEndpointProvider extends Object implements ClientEndpointProvider
An implementation of ClientEndpointProvider that uses static values.
See Also:
  • Constructor Details

    • StaticClientEndpointProvider

      public StaticClientEndpointProvider(URI clientEndpoint, boolean isEndpointOverridden)
  • Method Details

    • sanitizedEndpointString

      public final String sanitizedEndpointString()
      Returns the client endpoint as a string with the query and user-info components stripped, as the rules engine's ParseURL rejects a URI carrying query parameters. Returns null if the endpoint is not overridden.

      Returns the same String reference on every call, because the value is computed once at construction. That removes a URI construction and its string conversion from every request that resolves an endpoint against an overridden client endpoint.

      final so that the cached value cannot be shadowed by a subclass whose overridden accessors the constructor did not see.

      Specified by:
      sanitizedEndpointString in interface ClientEndpointProvider
    • clientEndpoint

      public URI clientEndpoint()
      Description copied from interface: ClientEndpointProvider
      Retrieve the client endpoint from this provider.
      Specified by:
      clientEndpoint in interface ClientEndpointProvider
    • isEndpointOverridden

      public boolean isEndpointOverridden()
      Description copied from interface: ClientEndpointProvider
      Returns true if this endpoint was specified as an override by the customer, or false if it was determined automatically by the SDK.
      Specified by:
      isEndpointOverridden in interface ClientEndpointProvider
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object