subscribeFor

fun subscribeFor(eventTypes: Array<String>, listener: STWEventListener<STWEvent>): Disposable
fun subscribeFor(eventTypes: Array<Class<out STWEvent>>, listener: STWEventListener<STWEvent>): Disposable

Subscribes to the specific eventTypes of the client.


fun subscribeFor(    lifecycleOwner: LifecycleOwner,     eventTypes: Array<String>,     listener: STWEventListener<STWEvent>): Disposable
fun subscribeFor(    lifecycleOwner: LifecycleOwner,     eventTypes: Array<Class<out STWEvent>>,     listener: STWEventListener<STWEvent>): Disposable

Subscribes to the specific eventTypes of the client, in the lifecycle of lifecycleOwner.

Only receives events when the lifecycle is in a STARTED state, otherwise events are dropped.


fun subscribeFor(    eventTypes: Array<String>,     filter: (STWEvent) -> Boolean,     listener: STWEventListener<STWEvent>): Disposable

Subscribes to the specific eventTypes of the client with additional filter.


fun subscribeFor(    lifecycleOwner: LifecycleOwner,     eventTypes: Array<String>,     filter: (STWEvent) -> Boolean,     listener: STWEventListener<STWEvent>): Disposable

Subscribes to the specific eventTypes of the client with additional filter, in the lifecycle of lifecycleOwner.

Only receives events when the lifecycle is in a STARTED state, otherwise events are dropped.