Async
Result and callbacks for asynchronous connection, shift and terminal administration operations. Payments use TransactionHandle; pre-transactions use PreTransactionHandle.
The underlying operation has already started running on a background thread by the time this object is returned - registering onComplete/onException only attaches callbacks to it, it does not trigger anything:
terminal.connectAsync()
.onComplete(result -> ui.showConnected(result))
.onException(error -> ui.showError(error));future exposes the same outcome as a plain CompletableFuture, so callers that want to wait synchronously can do so with future().join() (or .get()) instead of, or in addition to, registering onComplete/onException.
Functions
The underlying CompletableFuture, for callers that want to .join()/.get() instead.
Called with the outcome once the operation completes.
Called instead of onComplete if the operation could not be completed.