com.vaadin.collaborationengine.
Class TopicConnectionRegistration
- java.lang.Object
-
- com.vaadin.collaborationengine.TopicConnectionRegistration
-
All Implemented Interfaces:
public class TopicConnectionRegistration extends Object implements Registration
A registration for configuring or removing a topic connection that is opened with Collaboration Engine.
Since:
3.0
Author:
Vaadin Ltd
See Also:
CollaborationEngine.openTopicConnection(ConnectionContext, String, UserInfo, SerializableFunction)
, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
TopicConnectionRegistration.ConnectionFailedAction
An action for handling a failed topic connection.
static class
TopicConnectionRegistration.ConnectionFailedEvent
An event that is fired when the topic connection fails.
-
Method Summary
All Methods Modifier and Type Method Description void
onConnectionFailed​(TopicConnectionRegistration.ConnectionFailedAction connectionFailedAction)
Adds an action to be executed if the topic connection fails.
void
remove()
Closes the topic connection.
-
-
-
Method Detail
-
remove
public void remove()
Closes the topic connection. NO-OP if the connection has failed.
Specified by:
remove
in interfaceRegistration
See Also:
-
onConnectionFailed
public void onConnectionFailed​(TopicConnectionRegistration.ConnectionFailedAction connectionFailedAction)
Adds an action to be executed if the topic connection fails. The connection can fail in production mode, if your Collaboration Engine license has expired, or if the number of unique monthly end users has exceeded the quota in your license.
If the connection has already failed when calling this method, the action runs immediately.
The action is executed through
ActionDispatcher.dispatchAction(Command)
of the connection context that was used to open the connection.Parameters:
connectionFailedAction
- the action to handle topic connection failure, notnull
-
-