ModuleProxy

interface ModuleProxy<T : Module>

A ModuleProxy is to be used for proxying access to modules that are or were available to access from the main Tealium implementation.

Any external Module implementation that provides functionality expected to be used by a developer should wrap their access to Tealium through a ModuleProxy.

Functions

Link copied to clipboard

Eagerly executes a task for the Module. The task should use the provided callback to emit a result to the returned Observable.

Link copied to clipboard
abstract fun <R> executeModuleTask(task: (T) -> R): Single<TealiumResult<R>>

Eagerly executes a task for the Module, with the result returned as a TealiumResult

Link copied to clipboard
abstract fun getModule(callback: Callback<T?>)

Retrieves the Module, providing it in the callback.

Link copied to clipboard
abstract fun observeModule(): Subscribable<T?>
abstract fun <R> observeModule(transform: (T) -> Observable<R>): Subscribable<R>

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