ServiceClientLiveDataMap

class ServiceClientLiveDataMap(    methodId: Int,     serviceHandler: CommunicationsServiceHandler,     coroutineScope: CoroutineScope = MainScope()) : LiveData<Map<ByteString, ByteString?>>

Remote live data map client.

When the first observer is added, instances of this class will automatically open a streaming call to the specified methodId on the specified serviceHandler. When the last observer is removed it will cancel the streaming call.

The streaming call will provide asynchronous updates to the map, that will be available as the observed value updates.

Constructors

Link copied to clipboard
fun ServiceClientLiveDataMap(    methodId: Int,     serviceHandler: CommunicationsServiceHandler,     coroutineScope: CoroutineScope = MainScope())

Functions

Link copied to clipboard
fun <K, V> translate(keyMap: (ByteString) -> K, valueMap: (ByteString) -> V): LiveData<Map<K, V?>>

Inherited functions

Link copied to clipboard
@Nullable
open fun getValue(): Map<ByteString, ByteString?>?
Link copied to clipboard
open fun hasActiveObservers(): Boolean
Link copied to clipboard
open fun hasObservers(): Boolean
Link copied to clipboard
@MainThread
open fun observe(@NonNull p0: LifecycleOwner, @NonNull p1: Observer<in Map<ByteString, ByteString?>>)
Link copied to clipboard
@MainThread
open fun observeForever(@NonNull p0: Observer<in Map<ByteString, ByteString?>>)
Link copied to clipboard
@MainThread
open fun removeObserver(@NonNull p0: Observer<in Map<ByteString, ByteString?>>)
Link copied to clipboard
@MainThread
open fun removeObservers(@NonNull p0: LifecycleOwner)