Package com.vaadin.collaborationengine
Class MessageManager
java.lang.Object
com.vaadin.collaborationengine.AbstractCollaborationManager
com.vaadin.collaborationengine.MessageManager
- All Implemented Interfaces:
Serializable
@Deprecated(since="25.3",
forRemoval=true)
public class MessageManager
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 messages sent to a topic. It allows submitting messages to
a topic and set a handler to react when a new message has been submitted.
- Author:
- Vaadin Ltd
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.collaborationengine.AbstractCollaborationManager
AbstractCollaborationManager.ActivationHandler -
Constructor Summary
ConstructorsConstructorDescriptionMessageManager(ConnectionContext context, UserInfo localUser, String topicId, CollaborationMessagePersister persister, SerializableSupplier<CollaborationEngine> ceSupplier) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new persisting manager for the given connection context.MessageManager(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 given connection context.MessageManager(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 given component.MessageManager(Component component, UserInfo localUser, String topicId, CollaborationMessagePersister persister) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new persisting manager for the given component. -
Method Summary
Modifier and TypeMethodDescriptionvoidsetMessageHandler(MessageHandler handler) Deprecated, for removal: This API element is subject to removal in a future version.Sets a handler which will be invoked for all messages already in the topic and when a new message is submitted.submit(CollaborationMessage message) Deprecated, for removal: This API element is subject to removal in a future version.Submits a message to the topic.Deprecated, for removal: This API element is subject to removal in a future version.Submits a message to the topic as the current local user.Methods inherited from class com.vaadin.collaborationengine.AbstractCollaborationManager
close, getCollaborationEngine, getLocalUser, getTopicId, onConnectionFailed, openTopicConnection, setActivationHandler
-
Constructor Details
-
MessageManager
Deprecated, for removal: This API element is subject to removal in a future version.Creates a new manager for the given component.- 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
-
MessageManager
public MessageManager(Component component, UserInfo localUser, String topicId, CollaborationMessagePersister persister) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new persisting manager for the given component.- Parameters:
component- the component which holds UI access, notnulllocalUser- the information of the local user, notnulltopicId- the id of the topic to connect to, notnullpersister- the persister to read/write messages to an external source
-
MessageManager
public MessageManager(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 given connection context.- 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
-
MessageManager
public MessageManager(ConnectionContext context, UserInfo localUser, String topicId, CollaborationMessagePersister persister, SerializableSupplier<CollaborationEngine> ceSupplier) Deprecated, for removal: This API element is subject to removal in a future version.Creates a new persisting manager for the given connection context.- Parameters:
context- the context that manages connection status, notnulllocalUser- the information of the local user, notnulltopicId- the id of the topic to connect to, notnullpersister- the persister to read/write messages to an external sourceceSupplier- the collaboration engine instance to use, notnull
-
-
Method Details
-
setMessageHandler
Deprecated, for removal: This API element is subject to removal in a future version.Sets a handler which will be invoked for all messages already in the topic and when a new message is submitted.The handler accepts a
MessageHandler.MessageContextas a parameter which contains a reference to the sent message.- Parameters:
handler- the message handler, ornullto remove an existing handler
-
submit
Deprecated, for removal: This API element is subject to removal in a future version.Submits a message to the topic as the current local user.- Parameters:
text- the text of the message, notnull- Returns:
- a future which will complete when the message has been added to
the topic, not
null
-
submit
Deprecated, for removal: This API element is subject to removal in a future version.Submits a message to the topic.- Parameters:
message- the message, notnull- Returns:
- a future which will complete when the message has been added to
the topic, not
null
-