- Index
- »
- obs
- »
- Observable
type
Observable
abstract const class Observable : Obj
Observable is the subject of an asynchronous data stream.
NOTE: this API is subject to change
methods
hasSubscriptions |
Does this observer have any active subscriptions |
---|---|
name |
Return the name of this observable. |
onSubscribe |
Callback when new observer is subscribing. |
onUnsubscribe |
Callback after an observer is unsubscribed. |
subscribe |
Subscribe an observer actor to this this observables data stream |
subscriptions |
List the active subscriptions |
unsubscribe |
Unsubscribe a current subscription |
unsubscribeAll |
Unsubscribe all subscriptions |
Slot Details
hasSubscriptions
Bool hasSubscriptions()
Does this observer have any active subscriptions
name
abstract Str name()
Return the name of this observable. This name must match up with the the observe
def subtype name
onSubscribe
protected virtual Subscription onSubscribe(Observer observer, Dict config)
Callback when new observer is subscribing. Subclasses can check the config and return their own subscription subclass. This callback can be from any thread, so must be thread safe.
onUnsubscribe
protected virtual Void onUnsubscribe(Subscription s)
Callback after an observer is unsubscribed. This callback can be from any thread, so must be thread safe.
subscribe
Subscription subscribe(Observer observer, Dict config)
Subscribe an observer actor to this this observables data stream
subscriptions
Subscription[] subscriptions()
List the active subscriptions
unsubscribe
Void unsubscribe(Subscription s)
Unsubscribe a current subscription
unsubscribeAll
Void unsubscribeAll()
Unsubscribe all subscriptions