Page Summary
-
ApiTaskResult represents the result of a Task, including additional information about the outcome.
-
It can be constructed with just a Status for failed tasks or with a result and a Status for successful tasks.
-
Key methods include getResult() to retrieve the task's result and getStatus() to retrieve the task's status.
A representation of the result of a Task
, which includes
additional information about the outcome of the execution.
Public Constructor Summary
| * | |
| * |
Public Method Summary
| T | |
| Status | |
| String | toString
()
|
Inherited Method Summary
Public Constructors
public ApiTaskResult ( Status status)
Creates an instance of ApiTaskResult
for situations when the Task
fails to
return a result.
Parameters
public ApiTaskResult (T result, Status status)
Creates an instance of ApiTaskResult
with a result and a status.
Parameters
| result | the result of the task. |
|---|---|
| status | a Status
object with information about the operation. |
Public Methods
public T getResult ()
Returns the result of the task.
Returns
- The result of the task, only present if the task completed successfully.
public Status getStatus ()
Returns the status of the task.
Returns
- The status of the task with information about the result of the operation.

