RoutexRefreshAsyncClient
Java-friendly async facade for RoutexRefreshClient: every public method is exposed here as an instance method returning CompletableFuture. Kotlin callers should use RoutexRefreshClient directly; this class is intended for Java consumers and other JVM languages that integrate with CompletableFuture.
The conceptual model carries over from RoutexRefreshClient: each call is authorized by a typed Ticket and uses a ConnectionData envelope (obtained from a prior interactive flow's Response.Result.connectionData). There is no interrupt loop; calls either return a NonInteractiveResponse with the typed payload, or throw a RoutexError subclass. The two that signal "drive a fresh interactive flow" are InterruptError (the umbrella signal when the bank wants user input on a non-interactive call) and ConsentExpired (the typed signal that the consent itself has expired or been revoked).
Usage
try (RoutexRefreshAsyncClient refresh = new RoutexRefreshAsyncClient()) {
refresh
.balances(ticket, connectionData, accountReferences)
.whenComplete(
(response, error) -> {
if (error != null) {
// RoutexError subclass, RoutexClientError, or I/O exception
handleFailure(error);
return;
}
Balances balances = response.getResult();
// ...
});
}Calling CompletableFuture.get / CompletableFuture.join instead rewraps failures in ExecutionException (get) or CompletionException (join); unwrap with e.getCause() to recover the underlying exception.
Lifecycle
The supplied Executor (default ForkJoinPool.commonPool) backs every emitted future. close cancels in-flight futures with CancellationException and rejects later calls. Instances are safe to share across threads.
Constructors
Construct a client.
Convenience overload that parses baseUrl as a Ktor Url.
Functions
Refresh accounts (and selected fields) for the connection encoded in connectionData.
Refresh current balances for accounts under connectionData.
Fetch metadata for a single service connection.
Search for service connections (banks and other providers).
Authenticated TEE system version learned during settlement of ticket's key-settlement session.
Refresh booked-and-pending transactions for connectionData.