open class Future
Base class for all our Futures.
This mainly decouples our Futures from the TomP2P Futures. This means, users of this class need not import TomP2P.
Note: DO have a look at how TomP2P defines completion, success and failure before using this!
Future(baseFuture: BaseFuture)
Base class for all our Futures. |
val baseFuture: BaseFuture
base TomP2P BaseFuture |
fun await(): Future
Await async operation to end |
|
fun awaitListeners(): Future
Await all registered listeners |
|
fun onComplete(emitter: () -> Unit): Unit
An operation has completed. Check net.tomp2p.futures.BaseFuture.onComplete for the full semantics |
|
fun onFailure(emitter: (failedReason: String) -> Unit): Unit
The connection has failed. Check net.tomp2p.futures.BaseFuture.onFailure for the full semantics |
|
fun onSuccess(emitter: () -> Unit): Unit
A response has been received. Check net.tomp2p.futures.BaseFuture.onSuccess for the full semantics |
open class GetFuture<T> : Future
Base class for all futures that get something. Get one element. |