com.amazonaws.util
Class AwsHostNameUtils

java.lang.Object
  extended by com.amazonaws.util.AwsHostNameUtils

public class AwsHostNameUtils
extends java.lang.Object


Constructor Summary
AwsHostNameUtils()
           
 
Method Summary
static java.lang.String localHostName()
          Returns the host name for the local host.
static java.lang.String parseRegionName(java.lang.String host, java.lang.String serviceHint)
          Attempts to parse the region name from an endpoint based on conventions about the endpoint format.
static java.lang.String parseRegionName(java.net.URI endpoint)
          Deprecated. in favor of parseRegionName(String, String).
static java.lang.String parseServiceName(java.net.URI endpoint)
          Deprecated. because it's no longer needed by the SDK, and therefore not maintained.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AwsHostNameUtils

public AwsHostNameUtils()
Method Detail

parseRegionName

@Deprecated
public static java.lang.String parseRegionName(java.net.URI endpoint)
Deprecated. in favor of parseRegionName(String, String).


parseRegionName

public static java.lang.String parseRegionName(java.lang.String host,
                                               java.lang.String serviceHint)
Attempts to parse the region name from an endpoint based on conventions about the endpoint format.

Parameters:
host - the hostname to parse
serviceHint - 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
public static java.lang.String parseServiceName(java.net.URI endpoint)
Deprecated. because it's no longer needed by the SDK, and therefore not maintained.

Parses the service name from an endpoint. Can only handle endpoints of the form 'service.[region.]amazonaws.com'.


localHostName

public static java.lang.String 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.



Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.