Package org.jclouds.s3.filters
Class AwsHostNameUtils
java.lang.Object
org.jclouds.s3.filters.AwsHostNameUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringparseRegionName(String host, String serviceHint) Attempts to parse the region name from an endpoint based on conventions about the endpoint format.static StringparseServiceName(URI endpoint) Parses the service name from an endpoint.
-
Constructor Details
-
AwsHostNameUtils
public AwsHostNameUtils()
-
-
Method Details
-
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
Parses the service name from an endpoint. Can only handle endpoints of the form 'service.[region.]amazonaws.com'. or bucket.s3.[region.]awazonaws.com
-