FrontendCoordinatorContext

@IviExperimental(reasons = [])
data class FrontendCoordinatorContext<PR : PanelRegistry> @IviInternal constructor(val lifecycleOwner: LifecycleOwner, val iviServiceProvider: IviInstanceBoundIviServiceProvider, val frontendMetadata: Collection<FrontendMetadata>, val frontendContextFactory: FrontendContextFactory, val panelRegistryFactory: PanelRegistryFactory<PR>, val frontendCoordinationRulesFactory: FrontendCoordinationRulesFactory<PR>, val createAfterStartupFrontendsTrigger: Flow<Boolean>, val createAfterStartupFrontendsTimeout: Flow<Duration>)

The entry point for a single FrontendCoordinator to communicate with the rest of the system. The FrontendCoordinatorContext should only be created by a system UI host through the LifecycleViewModel.createDefaultFrontendCoordinatorContext or LifecycleViewModel.createFrontendCoordinatorContext extension functions and can be modified afterwards using the copy method.

Parameters

PR

The type of the PanelRegistry that the FrontendCoordinator should use.

Constructors

Link copied to clipboard
constructor(lifecycleOwner: LifecycleOwner, iviServiceProvider: IviInstanceBoundIviServiceProvider, frontendMetadata: Collection<FrontendMetadata>, frontendContextFactory: FrontendContextFactory, panelRegistryFactory: PanelRegistryFactory<PR>, frontendCoordinationRulesFactory: FrontendCoordinationRulesFactory<PR>, createAfterStartupFrontendsTrigger: Flow<Boolean>, createAfterStartupFrontendsTimeout: Flow<Duration>)

Properties

Link copied to clipboard

A Flow containing the timeout within which the creation of the frontends with FrontendCreationPolicy.CREATE_FRONTEND_AFTER_STARTUP should begin. If this timeout expires a RuntimeException is thrown.

Link copied to clipboard

Indicates whether frontends adhering to FrontendCreationPolicy.CREATE_FRONTEND_AFTER_STARTUP should be created.

Link copied to clipboard

The factory used to create FrontendContexts when creating Frontends.

Link copied to clipboard

A factory for the coordinator to create and activate a set of FrontendCoordinationRules.

Link copied to clipboard

The metadata about the frontends that this instance should coordinate.

Link copied to clipboard

The service provider to use communicate with various services, such as the main menu and notification display services.

Link copied to clipboard

The lifecycle during which the coordinator is active.

Link copied to clipboard

A factory for the coordinator to create a PanelRegistry.