observeModule

abstract fun <T : Module> observeModule(clazz: Class<T>): Observable<T?>

Observes the Module matching the given clazz, regardless of whether it is currently enabled.

While the modules are being created or updated, a subscriber receives no value at all rather than a premature null. Once this starts emitting, null means the Module is not enabled.

When multiple modules match clazz at the same time, the first one, ordered by com.tealium.prism.core.internal.settings.ModuleSettings.order, is emitted.

Return

An Observable emitting after every modules update in which the matching Module changes by identity.

Parameters

clazz

The Class or Interface to match against