ripe / com.ripe.android.base / Observable / bindAsync

bindAsync

fun bindAsync(event: String, callback: ObservableCallback): ObservableCallback

Binds to an event by providing a block that will receive the event payload as a parameter and return a Deferred that will be completed asynchronously.

Parameters

event - Name of the event to bind to.

callback - Block to be executed when the event is triggered.

Return
Returns the provided callback, to be used when unbinding from the event.