open class GetCustomFuture<T, U> : GetFuture<T>
Get one element and transform it.
GetCustomFuture(futureGet: FutureGet, transformer: (U) -> T)
Get one element and transform it. |
val futureGet: FutureGet
base TomP2P FutureGet |
|
val transformer: (U) -> T
callable, to transform the DHT's response type to the method's return type. Note: when the response is null, the transformer is skipped. |
open fun onGet(emitter: (data: T) -> Unit): Unit
A single element has been found and has been transformed |
open fun onNotFound(emitter: () -> Unit): Unit
A single element has not been found |