dwrtc / ch.hsr.dsl.dwrtc.signaling / GetFuture

GetFuture

open class GetFuture<T> : Future

Base class for all futures that get something. Get one element.

In the subclasses, you will get easy semantics.

The subclasses differ by these orthogonal concepts:

Constructors

<init>

GetFuture(futureGet: FutureGet)

Base class for all futures that get something. Get one element.

Properties

futureGet

val futureGet: FutureGet

base TomP2P FutureGet

Inherited Properties

baseFuture

val baseFuture: BaseFuture

base TomP2P BaseFuture

Functions

onGet

open fun onGet(emitter: (data: T) -> Unit): Unit

A single element has been found

onNotFound

open fun onNotFound(emitter: () -> Unit): Unit

A single element has not been found

Inherited Functions

await

fun await(): Future

Await async operation to end

awaitListeners

fun awaitListeners(): Future

Await all registered listeners

onComplete

fun onComplete(emitter: () -> Unit): Unit

An operation has completed. Check net.tomp2p.futures.BaseFuture.onComplete for the full semantics

onFailure

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

The connection has failed. Check net.tomp2p.futures.BaseFuture.onFailure for the full semantics

onSuccess

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

A response has been received. Check net.tomp2p.futures.BaseFuture.onSuccess for the full semantics

Inheritors

GetAllCustomFuture

class GetAllCustomFuture<T, U> : GetFuture<T>

Get multiple elements and transform them

GetCustomFuture

open class GetCustomFuture<T, U> : GetFuture<T>

Get one element and transform it.