Package com.amazonaws.util
Class AwsHostNameUtils
java.lang.Object
com.amazonaws.util.AwsHostNameUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Returns the host name for the local host.static String
parseRegionName
(String host, String serviceHint) Attempts to parse the region name from an endpoint based on conventions about the endpoint format.static String
parseRegionName
(URI endpoint) Deprecated.static String
parseServiceName
(URI endpoint) Deprecated.
-
Constructor Details
-
AwsHostNameUtils
public AwsHostNameUtils()
-
-
Method Details
-
parseRegionName
Deprecated.in favor ofparseRegionName(String, String)
. -
parseRegionName
Attempts to parse the region name from an endpoint based on conventions about the endpoint format.- Parameters:
host
- the hostname to parseserviceHint
- an optional hint about the service for the endpoint- Returns:
- the region parsed from the hostname, or "us-east-1" if no region information could be found
-
parseServiceName
Deprecated.Parses the service name from an endpoint. Can only handle endpoints of the form 'service.[region.]amazonaws.com'. -
localHostName
Returns the host name for the local host. If the operation is not allowed by the security check, the textual representation of the IP address of the local host is returned instead. If the ip address of the local host cannot be resolved or if there is any other failure, "localhost" is returned as a fallback.
-
parseRegionName(String, String)
.