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
null
public static SystemConnectionContext getInstance()
CollaborationEngine.getInstance()
is available.null
IllegalStateException
- in case no current collaboration engine instance is availablepublic Registration init(ActivationHandler activationHandler, Executor executor)
ConnectionContext
ActivationHandler
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 ConnectionContext
activationHandler
- the handler for activation changesexecutor
- executor that should be used by the handler to execute
background tasks. Not null
null
if there
is nothing to clean upCopyright © 2022. All rights reserved.