observeModule

abstract fun observeModule(): Subscribable<T?>

Observe an Observable of the Module regardless of if the Module is currently enabled or not.

The stream completes once the Tealium instance fails to initialize or is shut down.

Return

A Subscribable for the inner Observable.


abstract fun <R> observeModule(transform: (T) -> Observable<R>): Subscribable<R>

Observes an Observable derived from the Module, re-deriving it as the module's availability changes.

Use this for event streams: it emits only while the Module is enabled, stays silent while it is disabled or missing, and completes once the Tealium instance fails to initialize or is shut down. For state streams, where subscribers must know that the Module is unavailable, use observeModuleResult instead.

Values the Module emits while the Tealium instance is shutting down are not delivered: the completion is the last event a subscriber receives.

Return

A Subscribable for the inner Observable.

Parameters

transform

: The transformation that maps the Module to one of it's Observables.