dwrtc / ch.hsr.dsl.dwrtc.util / net.tomp2p.futures.BaseFuture

Extensions for net.tomp2p.futures.BaseFuture

onComplete

fun BaseFuture.onComplete(emitter: (future: BaseFuture) -> Unit): Unit

Raised whenever an operation has been completed. It's not yet defined, if the operation has been successful.

onFailure

fun BaseFuture.onFailure(emitter: (failedReason: String) -> Unit): Unit

Raised whenever an operation has failed

onSuccess

fun BaseFuture.onSuccess(emitter: () -> Unit): Unit

Raised whenever an operation is successful