Interface GeoRoutesAsyncClient
- All Superinterfaces:
AutoCloseable
,AwsClient
,SdkAutoCloseable
,SdkClient
builder()
method.The asynchronous client performs non-blocking I/O when configured with any
SdkAsyncHttpClient
supported in the SDK. However, full non-blocking is not guaranteed as the async client may
perform blocking calls in some cases such as credentials retrieval and endpoint discovery as part of the async API
call.
With the Amazon Location Routes API you can calculate routes and estimate travel time based on up-to-date road network and live traffic information.
Calculate optimal travel routes and estimate travel times using up-to-date road network and traffic data. Key features include:
-
Point-to-point routing with estimated travel time, distance, and turn-by-turn directions
-
Multi-point route optimization to minimize travel time or distance
-
Route matrices for efficient multi-destination planning
-
Isoline calculations to determine reachable areas within specified time or distance thresholds
-
Map-matching to align GPS traces with the road network
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Value for looking up the service's metadata from theServiceMetadataProvider
.static final String
-
Method Summary
Modifier and TypeMethodDescriptionstatic GeoRoutesAsyncClientBuilder
builder()
Create a builder that can be used to configure and create aGeoRoutesAsyncClient
.calculateIsolines
(Consumer<CalculateIsolinesRequest.Builder> calculateIsolinesRequest) Use theCalculateIsolines
action to find service areas that can be reached in a given threshold of time, distance.calculateIsolines
(CalculateIsolinesRequest calculateIsolinesRequest) Use theCalculateIsolines
action to find service areas that can be reached in a given threshold of time, distance.calculateRouteMatrix
(Consumer<CalculateRouteMatrixRequest.Builder> calculateRouteMatrixRequest) UseCalculateRouteMatrix
to compute results for all pairs of Origins to Destinations.calculateRouteMatrix
(CalculateRouteMatrixRequest calculateRouteMatrixRequest) UseCalculateRouteMatrix
to compute results for all pairs of Origins to Destinations.default CompletableFuture
<CalculateRoutesResponse> calculateRoutes
(Consumer<CalculateRoutesRequest.Builder> calculateRoutesRequest) CalculateRoutes
computes routes given the following required parameters:Origin
andDestination
.default CompletableFuture
<CalculateRoutesResponse> calculateRoutes
(CalculateRoutesRequest calculateRoutesRequest) CalculateRoutes
computes routes given the following required parameters:Origin
andDestination
.static GeoRoutesAsyncClient
create()
Create aGeoRoutesAsyncClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
.optimizeWaypoints
(Consumer<OptimizeWaypointsRequest.Builder> optimizeWaypointsRequest) OptimizeWaypoints
calculates the optimal order to travel between a set of waypoints to minimize either the travel time or the distance travelled during the journey, based on road network restrictions and the traffic pattern data.optimizeWaypoints
(OptimizeWaypointsRequest optimizeWaypointsRequest) OptimizeWaypoints
calculates the optimal order to travel between a set of waypoints to minimize either the travel time or the distance travelled during the journey, based on road network restrictions and the traffic pattern data.The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationdefault CompletableFuture
<SnapToRoadsResponse> snapToRoads
(Consumer<SnapToRoadsRequest.Builder> snapToRoadsRequest) SnapToRoads
matches GPS trace to roads most likely traveled on.default CompletableFuture
<SnapToRoadsResponse> snapToRoads
(SnapToRoadsRequest snapToRoadsRequest) SnapToRoads
matches GPS trace to roads most likely traveled on.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
Methods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider
.- See Also:
-
-
Method Details
-
calculateIsolines
default CompletableFuture<CalculateIsolinesResponse> calculateIsolines(CalculateIsolinesRequest calculateIsolinesRequest) Use the
CalculateIsolines
action to find service areas that can be reached in a given threshold of time, distance.- Parameters:
calculateIsolinesRequest
-- Returns:
- A Java Future containing the result of the CalculateIsolines operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- AccessDeniedException You don't have sufficient access to perform this action.
- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- ThrottlingException The request was denied due to request throttling.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- GeoRoutesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
calculateIsolines
default CompletableFuture<CalculateIsolinesResponse> calculateIsolines(Consumer<CalculateIsolinesRequest.Builder> calculateIsolinesRequest) Use the
CalculateIsolines
action to find service areas that can be reached in a given threshold of time, distance.
This is a convenience which creates an instance of the
CalculateIsolinesRequest.Builder
avoiding the need to create one manually viaCalculateIsolinesRequest.builder()
- Parameters:
calculateIsolinesRequest
- AConsumer
that will call methods onCalculateIsolinesRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the CalculateIsolines operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- AccessDeniedException You don't have sufficient access to perform this action.
- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- ThrottlingException The request was denied due to request throttling.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- GeoRoutesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
calculateRouteMatrix
default CompletableFuture<CalculateRouteMatrixResponse> calculateRouteMatrix(CalculateRouteMatrixRequest calculateRouteMatrixRequest) Use
CalculateRouteMatrix
to compute results for all pairs of Origins to Destinations. Each row corresponds to one entry in Origins. Each entry in the row corresponds to the route from that entry in Origins to an entry in Destinations positions.- Parameters:
calculateRouteMatrixRequest
-- Returns:
- A Java Future containing the result of the CalculateRouteMatrix operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- AccessDeniedException You don't have sufficient access to perform this action.
- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- ThrottlingException The request was denied due to request throttling.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- GeoRoutesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
calculateRouteMatrix
default CompletableFuture<CalculateRouteMatrixResponse> calculateRouteMatrix(Consumer<CalculateRouteMatrixRequest.Builder> calculateRouteMatrixRequest) Use
CalculateRouteMatrix
to compute results for all pairs of Origins to Destinations. Each row corresponds to one entry in Origins. Each entry in the row corresponds to the route from that entry in Origins to an entry in Destinations positions.
This is a convenience which creates an instance of the
CalculateRouteMatrixRequest.Builder
avoiding the need to create one manually viaCalculateRouteMatrixRequest.builder()
- Parameters:
calculateRouteMatrixRequest
- AConsumer
that will call methods onCalculateRouteMatrixRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the CalculateRouteMatrix operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- AccessDeniedException You don't have sufficient access to perform this action.
- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- ThrottlingException The request was denied due to request throttling.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- GeoRoutesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
calculateRoutes
default CompletableFuture<CalculateRoutesResponse> calculateRoutes(CalculateRoutesRequest calculateRoutesRequest) CalculateRoutes
computes routes given the following required parameters:Origin
andDestination
.- Parameters:
calculateRoutesRequest
-- Returns:
- A Java Future containing the result of the CalculateRoutes operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- AccessDeniedException You don't have sufficient access to perform this action.
- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- ThrottlingException The request was denied due to request throttling.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- GeoRoutesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
calculateRoutes
default CompletableFuture<CalculateRoutesResponse> calculateRoutes(Consumer<CalculateRoutesRequest.Builder> calculateRoutesRequest) CalculateRoutes
computes routes given the following required parameters:Origin
andDestination
.
This is a convenience which creates an instance of the
CalculateRoutesRequest.Builder
avoiding the need to create one manually viaCalculateRoutesRequest.builder()
- Parameters:
calculateRoutesRequest
- AConsumer
that will call methods onCalculateRoutesRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the CalculateRoutes operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- AccessDeniedException You don't have sufficient access to perform this action.
- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- ThrottlingException The request was denied due to request throttling.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- GeoRoutesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
optimizeWaypoints
default CompletableFuture<OptimizeWaypointsResponse> optimizeWaypoints(OptimizeWaypointsRequest optimizeWaypointsRequest) OptimizeWaypoints
calculates the optimal order to travel between a set of waypoints to minimize either the travel time or the distance travelled during the journey, based on road network restrictions and the traffic pattern data.- Parameters:
optimizeWaypointsRequest
-- Returns:
- A Java Future containing the result of the OptimizeWaypoints operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- AccessDeniedException You don't have sufficient access to perform this action.
- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- ThrottlingException The request was denied due to request throttling.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- GeoRoutesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
optimizeWaypoints
default CompletableFuture<OptimizeWaypointsResponse> optimizeWaypoints(Consumer<OptimizeWaypointsRequest.Builder> optimizeWaypointsRequest) OptimizeWaypoints
calculates the optimal order to travel between a set of waypoints to minimize either the travel time or the distance travelled during the journey, based on road network restrictions and the traffic pattern data.
This is a convenience which creates an instance of the
OptimizeWaypointsRequest.Builder
avoiding the need to create one manually viaOptimizeWaypointsRequest.builder()
- Parameters:
optimizeWaypointsRequest
- AConsumer
that will call methods onOptimizeWaypointsRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the OptimizeWaypoints operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- AccessDeniedException You don't have sufficient access to perform this action.
- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- ThrottlingException The request was denied due to request throttling.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- GeoRoutesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
snapToRoads
SnapToRoads
matches GPS trace to roads most likely traveled on.- Parameters:
snapToRoadsRequest
-- Returns:
- A Java Future containing the result of the SnapToRoads operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- AccessDeniedException You don't have sufficient access to perform this action.
- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- ThrottlingException The request was denied due to request throttling.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- GeoRoutesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
snapToRoads
default CompletableFuture<SnapToRoadsResponse> snapToRoads(Consumer<SnapToRoadsRequest.Builder> snapToRoadsRequest) SnapToRoads
matches GPS trace to roads most likely traveled on.
This is a convenience which creates an instance of the
SnapToRoadsRequest.Builder
avoiding the need to create one manually viaSnapToRoadsRequest.builder()
- Parameters:
snapToRoadsRequest
- AConsumer
that will call methods onSnapToRoadsRequest.Builder
to create a request.- Returns:
- A Java Future containing the result of the SnapToRoads operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()
to retrieve the underlying exception.- InternalServerException The request processing has failed because of an unknown error, exception or failure.
- AccessDeniedException You don't have sufficient access to perform this action.
- ValidationException The input fails to satisfy the constraints specified by an AWS service.
- ThrottlingException The request was denied due to request throttling.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- GeoRoutesException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
serviceClientConfiguration
Description copied from interface:SdkClient
The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfiguration
in interfaceAwsClient
- Specified by:
serviceClientConfiguration
in interfaceSdkClient
- Returns:
- SdkServiceClientConfiguration
-
create
Create aGeoRoutesAsyncClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
. -
builder
Create a builder that can be used to configure and create aGeoRoutesAsyncClient
.
-