public classApiTaskResultextendsObject
A representation of the result of aTask
,which includes
additional information about the outcome of the execution.
Public Constructor Summary
ApiTaskResult(Status
status)
Creates an instance of
ApiTaskResult
for situations when theTask
fails to return a result.
|
|
ApiTaskResult(T result,Status
status)
Creates an instance of
ApiTaskResult
with a result and a status.
|
Public Method Summary
T |
getResult()
Returns the result of the task.
|
Status |
getStatus()
Returns the status of the task.
|
String |
toString()
|
Inherited Method Summary
Public Constructors
publicApiTaskResult(Status status)
Creates an instance ofApiTaskResult
for situations when theTask
fails to
return a result.
Parameters
status | aStatus
object contains information about the cause of the failure. |
---|
publicApiTaskResult(T result,Status status)
Creates an instance ofApiTaskResult
with a result and a status.
Parameters
result | the result of the task. |
---|---|
status | aStatus
object with information about the operation. |
Public Methods
public TgetResult()
Returns the result of the task.
Returns
- The result of the task, only present if the task completed successfully.
publicStatus getStatus()
Returns the status of the task.
Returns
- The status of the task with information about the result of the operation.