Class CollaborationEngineConfiguration
CollaborationEngine
. When running in
production mode, it is required to set this configuration for the
Collaboration Engine associated with the current VaadinService
. This
should be done by calling
CollaborationEngine.configure(VaadinService, CollaborationEngineConfiguration)
in a VaadinServiceInitListener
.- Since:
- 3.0
- Author:
- Vaadin Ltd
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new Collaboration Engine configuration.CollaborationEngineConfiguration
(LicenseEventHandler licenseEventHandler) Deprecated, for removal: This API element is subject to removal in a future version.the provided handler won't receive any events, please prefer using the default constructor with no parameters -
Method Summary
Modifier and TypeMethodDescriptionGets the configured backend implementation.Gets the configured beacon path.Deprecated, for removal: This API element is subject to removal in a future version.the data-directory is not used since 6.3Gets the configuredExecutorService
which will be used to dispatch actions asynchronously.Deprecated, for removal: This API element is subject to removal in a future version.the handler is not used since 6.3Deprecated, for removal: This API element is subject to removal in a future version.license storage is not needed since 6.3boolean
Checks whether automatic push activation is enabled.void
setAutomaticallyActivatePush
(boolean automaticallyActivatePush) Sets whether server push should be automatically activated if needed.void
setBackend
(Backend backend) Sets the backend implementation to use.void
setBeaconPath
(String beaconPath) Sets the path that is used for the beacon handler.void
setDataDir
(String dataDir) Deprecated, for removal: This API element is subject to removal in a future version.the data-directory is not used since 6.3void
setExecutorService
(ExecutorService executorService) Sets theExecutorService
which will be used to dispatch actions asynchronously.void
setLicenseStorage
(LicenseStorage licenseStorage) Deprecated, for removal: This API element is subject to removal in a future version.license storage is not needed since 6.3
-
Constructor Details
-
CollaborationEngineConfiguration
@Deprecated(since="6.3", forRemoval=true) public CollaborationEngineConfiguration(LicenseEventHandler licenseEventHandler) Deprecated, for removal: This API element is subject to removal in a future version.the provided handler won't receive any events, please prefer using the default constructor with no parametersCreates a new Collaboration Engine configuration with the provided handler for license events.This constructor is deprecated and the provided handler won't receive any events.
- Parameters:
licenseEventHandler
- the license event handler, notnull
- Since:
- 3.0
-
CollaborationEngineConfiguration
public CollaborationEngineConfiguration()Creates a new Collaboration Engine configuration.
-
-
Method Details
-
getLicenseEventHandler
Deprecated, for removal: This API element is subject to removal in a future version.the handler is not used since 6.3Gets the license event handler of this configuration.- Returns:
- the license event handler
- Since:
- 3.0
-
getDataDir
Deprecated, for removal: This API element is subject to removal in a future version.the data-directory is not used since 6.3Gets the configured data-directory.- Returns:
- the data-directory
- Since:
- 3.0
-
setDataDir
Deprecated, for removal: This API element is subject to removal in a future version.the data-directory is not used since 6.3Sets the path to the data-directory, which is used by Collaboration Engine to store files.The data-directory can also be configured by setting the
vaadin.ce.dataDir
system property either in the command line or withSystem.setProperty(String, String)
. If a system property is set, it will take precedence over this setting.- Parameters:
dataDir
- path to the data-directory- Since:
- 3.0
-
getBeaconPath
Gets the configured beacon path.- Returns:
- the beacon path
-
setBeaconPath
Sets the path that is used for the beacon handler. This is used to detect when the user has closed a tab.The beacon path can also be configured by setting the
vaadin.ce.beaconPath
system property either in the command line or withSystem.setProperty(String, String)
. If a system property is set, it will take precedence over this setting.- Parameters:
beaconPath
- path used by the beacon handler
-
setAutomaticallyActivatePush
public void setAutomaticallyActivatePush(boolean automaticallyActivatePush) Sets whether server push should be automatically activated if needed. When enabled, which is the default, Collaboration Engine will automatically activatePushMode.AUTOMATIC
if neither push nor polling is active for a UI where CollaborationEngine is used. When disabled, no automatic changes are made to the application's push configuration.- Parameters:
automaticallyActivatePush
-true
to automatically activate server push if needed,false
to not make any automatic changes to the push configuration- Since:
- 3.0
-
isAutomaticallyActivatePush
public boolean isAutomaticallyActivatePush()Checks whether automatic push activation is enabled.- Returns:
true
if automatic server push configuration is enabled,false
if it's no enabled- Since:
- 3.0
- See Also:
-
setBackend
Sets the backend implementation to use. A backend can be used to distribute changes between multiple nodes in a cluster. By default, a local in-memory backend is used.This is currently an experimental feature and needs to be explicitly enabled using the Vaadin dev-mode Gizmo, in the experimental features tab, or by adding a
src/main/resources/vaadin-featureflags.properties
file with the following content:com.vaadin.experimental.collaborationEngineBackend=true
- Parameters:
backend
- the backend to use, notnull
-
getBackend
Gets the configured backend implementation.- Returns:
- the backend implementation, not
null
- See Also:
-
getLicenseStorage
Deprecated, for removal: This API element is subject to removal in a future version.license storage is not needed since 6.3Gets the configured license-storage implementation.- Returns:
- the license-storage implementation, or
null
if not configured
-
setLicenseStorage
@Deprecated(since="6.3", forRemoval=true) public void setLicenseStorage(LicenseStorage licenseStorage) Deprecated, for removal: This API element is subject to removal in a future version.license storage is not needed since 6.3Sets a configured license-storage implementation.- Parameters:
licenseStorage
- the license-storage implementation, ornull
to unset
-
getExecutorService
Gets the configuredExecutorService
which will be used to dispatch actions asynchronously. A custom executor service can be configured withsetExecutorService(ExecutorService)
.- Returns:
- the configured executor service, or
null
if not set
-
setExecutorService
Sets theExecutorService
which will be used to dispatch actions asynchronously. An executor service set with this method won't be shutdown automatically, so the developer should take care of that if needed. If not configured, Collaboration Engine will use a thread pool with a fixed number of threads equal to the number of available processors and will take care of shutting it down.- Parameters:
executorService
- the executor service, ornull
to remove a previously configured one
-