observeModules

abstract fun <T : Module> observeModules(clazz: Class<T>): Observable<List<T>>

Observes every Module matching the given clazz, regardless of whether they are currently enabled.

While the modules are being created or updated, a subscriber receives no value at all rather than a premature emptyList(). Once this starts emitting, an empty list means no Module matching clazz is enabled.

The emitted modules are ordered by com.tealium.prism.core.internal.settings.ModuleSettings.order.

Return

An Observable emitting after every modules update in which the matching Modules change by identity or order.

Parameters

clazz

The Class or Interface to match against