AI-generated Key Takeaways
-
GetApiTaskResult is an abstract class that extends ResolveApiTaskResult and is a contract yielding an ApiTaskResult with the result and additional operation information from a Task.
-
This class helps abstract common logic like building errors and relaying successful responses for implementers.
-
A known direct subclass is TaskResultContracts.GetPaymentDataResult, which wraps PaymentData and additional Task operation information.
-
The class includes public methods such as parseResult and protected abstract methods like taskResultFromIntent to process results from intents and tasks.
| Known Direct Subclasses |
A contract that takes a Task<T>
and yields an ApiTaskResult<T>
with the result and additional information about the operation.
This class abstracts common logic away from the implementer, like building errors from exceptions and intents, or relaying successful responses when a result is obtained.
Public Constructor Summary
Public Method Summary
| ApiTaskResult<T> |
parseResult(int resultCode, Intent
intent)
|
Protected Method Summary
| ApiTaskResult<T> |
outputFromTask(Task<T> task)
Extracts a result from a given
Task if
it is completed successfully.
|
| abstract T |
Inherited Method Summary
Public Constructors
public GetApiTaskResult ()
Public Methods
public ApiTaskResult<T> parseResult (int resultCode, Intent intent)
Protected Methods
protected ApiTaskResult<T> outputFromTask (Task<T> task)
Extracts a result from a given Task if it is
completed successfully.