Package com.vaadin.collaborationengine
Class PresenceManager
java.lang.Object
com.vaadin.collaborationengine.AbstractCollaborationManager
com.vaadin.collaborationengine.PresenceManager
- All Implemented Interfaces:
Serializable
@Deprecated(since="25.3",
forRemoval=true)
public class PresenceManager
extends AbstractCollaborationManager
Deprecated, for removal: This API element is subject to removal in a future version.
Collaboration Kit is superseded by Vaadin Signals. Deprecated as
of Vaadin 25.3 and to be removed in Vaadin 26.0. Use shared
signals instead.
Manager to handle user presence in topics. It allows to set the user presence
in the set topic and get a list of users currently set as present in the same
topic. A handler can be set to react when the presence of a user changes.
- Since:
- 3.2
- Author:
- Vaadin Ltd
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.collaborationengine.AbstractCollaborationManager
AbstractCollaborationManager.ActivationHandler -
Constructor Summary
ConstructorsConstructorDescriptionPresenceManager(ConnectionContext context, UserInfo localUser, String topicId, SerializableSupplier<CollaborationEngine> ceSupplier) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new manager for the provided connection context.PresenceManager(Component component, UserInfo localUser, String topicId) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new manager for the provided component. -
Method Summary
Modifier and TypeMethodDescriptionvoidmarkAsPresent(boolean markAsPresent) Deprecated, for removal: This API element is subject to removal in a future version.Configures the manager to mark the local user present in the topic.voidsetPresenceHandler(PresenceHandler handler) Deprecated, for removal: This API element is subject to removal in a future version.Sets a handler which will be invoked when a user becomes present.Methods inherited from class com.vaadin.collaborationengine.AbstractCollaborationManager
close, getCollaborationEngine, getLocalUser, getTopicId, onConnectionFailed, openTopicConnection, setActivationHandler
-
Constructor Details
-
PresenceManager
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new manager for the provided component.The provided user information is used to set the presence of the local user with
markAsPresent(boolean)(the default isfalse).- Parameters:
component- the component which holds UI access, notnulllocalUser- the information of the local user, notnulltopicId- the id of the topic to connect to, notnull
-
PresenceManager
public PresenceManager(ConnectionContext context, UserInfo localUser, String topicId, SerializableSupplier<CollaborationEngine> ceSupplier) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new manager for the provided connection context.The provided user information is used to set the presence of the local user with
markAsPresent(boolean)(the default isfalse).- Parameters:
context- the context that manages connection status, notnulllocalUser- the information of the local user, notnulltopicId- the id of the topic to connect to, notnullceSupplier- the collaboration engine instance to use, notnull
-
-
Method Details
-
markAsPresent
public void markAsPresent(boolean markAsPresent) Deprecated, for removal: This API element is subject to removal in a future version.Configures the manager to mark the local user present in the topic.If the user wasn't already present in the topic, all managers connected to the same topic will be notified of the change and their handlers will be applied to the user instance.
- Parameters:
markAsPresent-trueto mark the user as present in the topic,falseto set as not present
-
setPresenceHandler
Deprecated, for removal: This API element is subject to removal in a future version.Sets a handler which will be invoked when a user becomes present.The handler accepts a
PresenceHandler.PresenceContextinstance as a parameter and should return aRegistrationwhich will be removed when the user stops being present.Replacing an existing handler will remove all registrations from the previous one.
- Parameters:
handler- the user presence handler, ornullto remove an existing handler
-