com.vaadin.collaborationengine.
Interface ConnectionContext
-
All Known Implementing Classes:
public interface ConnectionContext
Defining how a topic connection should handle incoming changes.
Author:
Vaadin Ltd
-
-
Method Summary
All Methods Modifier and Type Method and Description <T> CompletableFuture<T>
createCompletableFuture()
Gets a completable future that needs to be resolved within the current context.
void
dispatchAction(Command action)
Dispatches the given action.
Registration
setActivationHandler(ActivationHandler handler)
Sets an instance of
ActivationHandler
to the current context.
-
-
-
Method Detail
-
setActivationHandler
Registration setActivationHandler(ActivationHandler handler)
Sets an instance of
ActivationHandler
to the current context. This method should include logic for updating the activation status.Parameters:
handler
- the handler for activation changesReturns:
the registration for any logic that needs to be cleaned up if the connection is closed permanently, or
null
if there is nothing to clean up
-
dispatchAction
void dispatchAction(Command action)
Dispatches the given action.
Parameters:
action
- the action to be executed in the context
-
createCompletableFuture
<T> CompletableFuture<T> createCompletableFuture()
Gets a completable future that needs to be resolved within the current context.
Returns:
the
CompletableFuture
to be resolved
-
-