DeliveryTaskManager
Stay organized with collections
Save and categorize content based on your preferences.
TaskManager implementation for the delivery vertical. Enables creation and modification of
tasks.
Methods in this class return a Future
. This
class may trigger an ExecutionException
for the following cases:
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
void |
finalize()
|
final Class<?>
|
getClass()
|
int |
hashCode()
|
final void |
notify()
|
final void |
notifyAll()
|
String
|
toString()
|
final void |
wait(long arg0, int arg1)
|
final void |
wait(long arg0)
|
final void |
wait()
|
Public Methods
Returns a Future that notifies of the outcome of an attempt to create a DeliveryTask
for the provided task id.
Returns a Future that notifies of the outcome of an attempt to modify the existing
DeliveryTask for the set task id.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-27 UTC.
[null,null,["Last updated 2025-08-27 UTC."],[[["\u003cp\u003e\u003ccode\u003eDeliveryTaskManager\u003c/code\u003e enables the creation and modification of delivery tasks within the Fleet Engine system.\u003c/p\u003e\n"],["\u003cp\u003eMethods within this class utilize \u003ccode\u003eFutures\u003c/code\u003e to handle asynchronous operations and may throw exceptions for communication issues or invalid operations.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ecreateTask\u003c/code\u003e is used to initiate a new \u003ccode\u003eDeliveryTask\u003c/code\u003e based on the provided request.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eupdateTask\u003c/code\u003e allows for modifications to an existing \u003ccode\u003eDeliveryTask\u003c/code\u003e using a specific request.\u003c/p\u003e\n"]]],["`DeliveryTaskManager` manages tasks within the delivery vertical, allowing for task creation and modification. It uses `createTask` with `CreateDeliveryTaskRequest` to generate new `DeliveryTask` entries. `updateTask`, paired with `UpdateDeliveryTaskRequest`, modifies existing `DeliveryTask` data. Both methods return a `Future` indicating operation outcomes. Errors may occur, including `UnsupportedOperationException` if the manager is cleaned up, or `StatusRuntimeException` if issues with FleetEngine communication arise.\n"],null,["# DeliveryTaskManager\n\npublic final class **DeliveryTaskManager** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nTaskManager implementation for the delivery vertical. Enables creation and modification of\ntasks.\n\nMethods in this class return a [Future](//developer.android.com/reference/java/util/concurrent/Future.html). This\nclass may trigger an [ExecutionException](//developer.android.com/reference/java/util/concurrent/ExecutionException.html)\nfor the following cases:\n\n- [UnsupportedOperationException](//developer.android.com/reference/java/lang/UnsupportedOperationException.html) if the method is called after the DeliveryTaskManager has been cleaned up.\n- [StatusRuntimeException](/maps/documentation/mobility/driver-sdk/scheduled/reference/driver_6/android/reference/io/grpc/StatusRuntimeException) if there is a problem related to communicating with FleetEngine. \n\n### Public Method Summary\n\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ListenableFuture\\\u003c[DeliveryTask](/maps/documentation/mobility/driver-sdk/scheduled/reference/driver_6/android/reference/com/google/android/libraries/mapsplatform/transportation/driver/api/delivery/data/DeliveryTask)\\\u003e | [createTask](/maps/documentation/mobility/driver-sdk/scheduled/reference/driver_6/android/reference/com/google/android/libraries/mapsplatform/transportation/driver/api/delivery/DeliveryTaskManager#createTask(com.google.android.libraries.mapsplatform.transportation.driver.api.delivery.data.CreateDeliveryTaskRequest))([CreateDeliveryTaskRequest](/maps/documentation/mobility/driver-sdk/scheduled/reference/driver_6/android/reference/com/google/android/libraries/mapsplatform/transportation/driver/api/delivery/data/CreateDeliveryTaskRequest) request) Returns a Future that notifies of the outcome of an attempt to create a DeliveryTask for the provided task id. |\n| ListenableFuture\\\u003c[DeliveryTask](/maps/documentation/mobility/driver-sdk/scheduled/reference/driver_6/android/reference/com/google/android/libraries/mapsplatform/transportation/driver/api/delivery/data/DeliveryTask)\\\u003e | [updateTask](/maps/documentation/mobility/driver-sdk/scheduled/reference/driver_6/android/reference/com/google/android/libraries/mapsplatform/transportation/driver/api/delivery/DeliveryTaskManager#updateTask(com.google.android.libraries.mapsplatform.transportation.driver.api.delivery.data.UpdateDeliveryTaskRequest))([UpdateDeliveryTaskRequest](/maps/documentation/mobility/driver-sdk/scheduled/reference/driver_6/android/reference/com/google/android/libraries/mapsplatform/transportation/driver/api/delivery/data/UpdateDeliveryTaskRequest) request) Returns a Future that notifies of the outcome of an attempt to modify the existing DeliveryTask for the set task id. |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Methods\n--------------\n\n#### public ListenableFuture\\\u003c[DeliveryTask](/maps/documentation/mobility/driver-sdk/scheduled/reference/driver_6/android/reference/com/google/android/libraries/mapsplatform/transportation/driver/api/delivery/data/DeliveryTask)\\\u003e\n**createTask** ([CreateDeliveryTaskRequest](/maps/documentation/mobility/driver-sdk/scheduled/reference/driver_6/android/reference/com/google/android/libraries/mapsplatform/transportation/driver/api/delivery/data/CreateDeliveryTaskRequest) request)\n\nReturns a Future that notifies of the outcome of an attempt to create a DeliveryTask\nfor the provided task id. \n\n#### public ListenableFuture\\\u003c[DeliveryTask](/maps/documentation/mobility/driver-sdk/scheduled/reference/driver_6/android/reference/com/google/android/libraries/mapsplatform/transportation/driver/api/delivery/data/DeliveryTask)\\\u003e\n**updateTask** ([UpdateDeliveryTaskRequest](/maps/documentation/mobility/driver-sdk/scheduled/reference/driver_6/android/reference/com/google/android/libraries/mapsplatform/transportation/driver/api/delivery/data/UpdateDeliveryTaskRequest) request)\n\nReturns a Future that notifies of the outcome of an attempt to modify the existing\nDeliveryTask for the set task id."]]