public class ComponentConnectionContext extends Object implements ConnectionContext
UI.access(Command).| Constructor and Description |
|---|
ComponentConnectionContext()
Creates an empty component connection context.
|
ComponentConnectionContext(Component component)
Creates a new component connection context which is initially using a
single component.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addComponent(Component component)
Adds a component instance to track for this context.
|
Registration |
init(ActivationHandler activationHandler,
Executor backgroundRunner)
Initializes the connection context with a
ActivationHandler and
an Executor. |
void |
removeComponent(Component component)
Stops tracking a component for this context.
|
public ComponentConnectionContext()
public ComponentConnectionContext(Component component)
component - the component to use, not nullpublic void addComponent(Component component)
component - the component to track, not nullremoveComponent(Component)public void removeComponent(Component component)
component - the component to stop tracking, not nulladdComponent(Component)public Registration init(ActivationHandler activationHandler, Executor backgroundRunner)
ConnectionContextActivationHandler and
an Executor.
The method Consumer.accept(Object) from the provided
ActivationHandler should be called with an
ActionDispatcher when this ConnectionContext is activated. When
this ConnectionContext is deactivated, it should call
Consumer.accept(Object) with a null parameter.
The ActionDispatcher should ensure synchronization within the
context of this ConnectionContext.
init in interface ConnectionContextactivationHandler - the handler for activation changesbackgroundRunner - executor that should be used by the handler to execute
background tasks. Not nullnull if there
is nothing to clean upCopyright © 2023. All rights reserved.