Package com.amazonaws.partitions
Class PartitionRegionImpl
- java.lang.Object
-
- com.amazonaws.partitions.PartitionRegionImpl
-
- All Implemented Interfaces:
RegionImpl
public class PartitionRegionImpl extends Object implements RegionImpl
A region implementation backed by the partition.
-
-
Constructor Summary
Constructors Constructor Description PartitionRegionImpl(String region, Partition p)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<String>
getAvailableEndpoints()
Returns an immutable collection of all the endpoints available in the region metadata.String
getDomain()
Returns the domain for this region; ex: "amazonaws.com".String
getName()
The unique system ID for this region; ex: "us-east-1".String
getPartition()
Returns the partition this region is in.String
getServiceEndpoint(String serviceName)
Returns the endpoint for the given service.boolean
hasHttpEndpoint(String serviceName)
Returns true if the service is explicitly enabled for http in this region or a service is partition wide enabled.boolean
hasHttpsEndpoint(String serviceName)
Returns true if the service is explicitly enabled for https in this region or a service is partition wide enabled.boolean
isServiceSupported(String serviceName)
Returns true if the service is explicitly enabled for a region or a service is partition wide enabled.
-
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:RegionImpl
The unique system ID for this region; ex: "us-east-1".- Specified by:
getName
in interfaceRegionImpl
- Returns:
- The unique system ID for this region.
-
getDomain
public String getDomain()
Description copied from interface:RegionImpl
Returns the domain for this region; ex: "amazonaws.com".- Specified by:
getDomain
in interfaceRegionImpl
- Returns:
- The domain for this region.
-
getPartition
public String getPartition()
Description copied from interface:RegionImpl
Returns the partition this region is in. I.E. 'aws' or 'aws-cn'- Specified by:
getPartition
in interfaceRegionImpl
- Returns:
- The partition this region is in.
-
getServiceEndpoint
public String getServiceEndpoint(String serviceName)
Returns the endpoint for the given service. If the region is not present under service configuration; but matches the region regex, then this system tries to guess the endpoint and returns it.- Specified by:
getServiceEndpoint
in interfaceRegionImpl
- See Also:
ServiceAbbreviations
-
isServiceSupported
public boolean isServiceSupported(String serviceName)
Returns true if the service is explicitly enabled for a region or a service is partition wide enabled. Returns false otherwise. For new regions that match the partition's region regex, if the service is enabled partition wide then this method will return true.- Specified by:
isServiceSupported
in interfaceRegionImpl
- See Also:
ServiceAbbreviations
-
hasHttpsEndpoint
public boolean hasHttpsEndpoint(String serviceName)
Returns true if the service is explicitly enabled for https in this region or a service is partition wide enabled. Returns false otherwise. For new regions that match the partition's region regex, if the service is enabled partition wide then this method will return true.- Specified by:
hasHttpsEndpoint
in interfaceRegionImpl
- See Also:
ServiceAbbreviations
-
hasHttpEndpoint
public boolean hasHttpEndpoint(String serviceName)
Returns true if the service is explicitly enabled for http in this region or a service is partition wide enabled. Returns false otherwise. For new regions that match the partition's region regex, if the service is enabled partition wide then this method will return true.- Specified by:
hasHttpEndpoint
in interfaceRegionImpl
- See Also:
ServiceAbbreviations
-
getAvailableEndpoints
public Collection<String> getAvailableEndpoints()
Description copied from interface:RegionImpl
Returns an immutable collection of all the endpoints available in the region metadata.- Specified by:
getAvailableEndpoints
in interfaceRegionImpl
-
-