Loading...
public final class FinancialAPI extends FinancialAidlAPI
FinancialAPI provides methods to process financial transactions through the Orchestrator service.
This API abstracts away the complexity of AIDL communication, service binding, and JSON serialization. It provides a simple suspend function to send financial requests and receive responses.
The API also supports cancellation of ongoing transactions through the cancelTransaction() method.
Note: This API is designed for use in applications that need to perform financial transactions using the Orchestrator service. It is not intended for general-purpose IPC or other types of requests.
| FinancialAPI | public FinancialAPI FinancialAPI(Contextcontext) |
| Name | Summary |
|---|---|
| bindingIntent | private final Intent bindingIntent |
| Name | Summary |
|---|---|
| cancelTransaction | public final Boolean cancelTransaction(StringrequestId) Cancel an ongoing financial transaction. |
| financialRequest | public final TrxRes financialRequest(FinancialReqrequest, Durationtimeout) Process a financial request through the Orchestrator service (suspend version). |
| getBindingIntent | public Intent getBindingIntent() |
| unbind | public final Unit unbind() Unbind from the Orchestrator service and clean up stored connections. Call this method when you're done using the API to free resources. |
| useService | public final T useService<T extends Any>(Durationtimeout,-SuspendFunction1<<Error-class:-unknown-class>,-T>block) Generic method to use the financial service with automatic binding, timeout, and connection reuse. |