FrontendRegistry

class FrontendRegistry(    lifecycleOwner: LifecycleOwner,     frontendMetadata: Collection<FrontendMetadata>,     frontendContextFactory: FrontendContextFactory)

Manages the lifecycles of Frontends based on the given frontendMetadata.

Parameters

lifecycleOwner

Provides the lifecycle for the Frontends that this registry manages.

frontendMetadata

The metadata used by the registry to create and manage Frontends.

frontendContextFactory

The factory used to create the FrontendContext instances needed to create Frontends.

Constructors

Link copied to clipboard
fun FrontendRegistry(    lifecycleOwner: LifecycleOwner,     frontendMetadata: Collection<FrontendMetadata>,     frontendContextFactory: FrontendContextFactory)

Properties

Link copied to clipboard
val areImmediatelyStartedFrontendsReady: LiveData<Boolean>

Whether all frontends with the FrontendCreationPolicy.CREATE_FRONTEND_AT_STARTUP frontend creation policy are ready.

Link copied to clipboard
val frontendMetadata: Set<FrontendMetadata>

The metadata used by the registry to create and manage Frontends.

Link copied to clipboard
val frontends: LiveData<Collection<Frontend>>

All created Frontends in the registry.

Functions

Link copied to clipboard
fun getMenuItemId(frontendContext: FrontendContext): MenuItem.Id?

Gets the menu item ID associated with the given frontendContext.

Link copied to clipboard
fun getOrCreateFrontend(menuItemId: MenuItem.Id): Frontend?

Gets the Frontend associates with the given menuItemId, creating the Frontend if it wasn't yet.

Extensions

Link copied to clipboard
fun FrontendRegistry.extractPanels(): LiveData<Collection<AnyPanel>>

Extracts all Panels from a from the Frontends within a PanelRegistry.