ApiTaskResult

public class ApiTaskResult extends Object

A representation of the result of a Task , which includes additional information about the outcome of the execution.

Public Constructor Summary

*
ApiTaskResult ( Status status)
Creates an instance of ApiTaskResult for situations when the Task 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

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
status
a Status object contains information about the cause of the failure.

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.

public String toString ()

Design a Mobile Site
View Site in Mobile | Classic
Share by: