public class SystemConnectionContext extends Object implements ConnectionContext
An instance can be acquired using getInstance() in any situation
where CollaborationEngine.getInstance() is available. Other
situations can use CollaborationEngine.getSystemContext() or create a
new context instance using the constructor.
| Constructor and Description |
|---|
SystemConnectionContext(CollaborationEngine ce)
Creates a new system connection context instance for the given
Collaboration Engine instance.
|
| Modifier and Type | Method and Description |
|---|---|
static SystemConnectionContext |
getInstance()
Gets the system connection context associated with the current
Collaboration Engine instance.
|
Registration |
init(ActivationHandler activationHandler,
Executor executor)
Initializes the connection context with a
ActivationHandler and
an Executor. |
public SystemConnectionContext(CollaborationEngine ce)
getInstance() or
CollaborationEngine.getSystemContext() rather than creating new
instances.ce - the collaboration engine instance to use, not
nullpublic static SystemConnectionContext getInstance()
CollaborationEngine.getInstance() is available.nullIllegalStateException - in case no current collaboration engine instance is availablepublic Registration init(ActivationHandler activationHandler, Executor executor)
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 changesexecutor - 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.