Interface ITaskRegistration
interface ITaskRegistration
Extends com.amazon.apmf.IStandard
The ITaskRegistration represents a submitted task and offers operations to update, query
information, and attach observers to the submitted task.
Methods
update()
Update a previously submitted Task with new parameters. Usevoidupdate(ITaskRequest*taskRequest)
ITaskRequestBuilder to build a valid ITaskRequest.
Note that update will apply to subsequent iterations of a repeating task
(retry upon failure or repetition) if the task is already executing. Update will fail if a
non repeating task is already executing.
Note that calling update will cancel in-progress retries and reset the retry count.
Note that update() keeps the same Uuid. This also means all existing observers are not
invalidated.
Parameters
taskRequest
ITaskRequest* — Required
The new Task parameters.
Throws
com.amazon.apmf.InvalidArgumentError— If the taskRequest is is invalidcom.amazon.apmf.SecurityError— If the client is not allowed to update the submitted taskcom.amazon.apmf.BaseError— For all other errors
remove()
void remove()
Remove this Task.
Note that remove will apply to subsequent iterations of a repeating task
(retry upon failure or repetition) if the task is already executing. Remove will fail if a
non repeating task is already executing.
Note that remove() will fail if Task is already running and only prevent future iterations
(retry upon failure or repetition).
Throws
com.amazon.apmf.InvalidArgumentError— If the task registration object is invalid.com.amazon.apmf.SecurityError— If the client is not allowed to update the submitted task.com.amazon.apmf.BaseError— For all other errors.
getTaskStatus()
Get the status of this Task.ITaskStatus*getTaskStatus()
Returns
ITaskStatus*
On success, returns an ITaskStatus containing the status of Task.
Throws
com.amazon.apmf.InvalidArgumentError— If the task registration object is invalid.com.amazon.apmf.SecurityError— If the client is not allowed to query the task.com.amazon.apmf.BaseError— For all other errors.
registerTaskObserver()
Register an observer for a Task. This method will instruct Task Manager to notify the observer on updates to the Task status. Seecom.amazon.apmf.ISubscription*registerTaskObserver(ITaskObserver*observer)
ITaskObserver for additional observer information.
Parameters
observer
ITaskObserver* — Required
An ITaskObserver instance to be notified on updates from Task.
Returns
com.amazon.apmf.ISubscription*
A Subscription object that uniquely identifying this observer.
getUuid()
com.amazon.apmf.Uuid getUuid()
Get the Uuid of this task. The Uuid is assigned by the system and can be used to uniquely
identify and query the task.
Returns
com.amazon.apmf.Uuid
The uuid of the task
getName()
string getName()
Get the unique name of this task. If the name is not set by the user, the task name is the
system generated Uuid.
Returns
string
The unique task name.

