com.vaadin.collaborationengine.
Class CollaborationEngineConfiguration
Configuration object for 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 configured
ExecutorServicewhich 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.3booleanChecks whether automatic push activation is enabled.
voidsetAutomaticallyActivatePush(boolean automaticallyActivatePush) Sets whether server push should be automatically activated if needed.
voidsetBackend(Backend backend) Sets the backend implementation to use.
voidsetBeaconPath(String beaconPath) Sets the path that is used for the beacon handler.
voidsetDataDir(String dataDir) Deprecated, for removal: This API element is subject to removal in a future version.
the data-directory is not used since 6.3voidsetExecutorService(ExecutorService executorService) Sets the
ExecutorServicewhich will be used to dispatch actions asynchronously.voidsetLicenseStorage(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, notnullSince:
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.dataDirsystem 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-directorySince:
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.beaconPathsystem 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 activate
PushMode.AUTOMATICif 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-trueto automatically activate server push if needed,falseto not make any automatic changes to the push configurationSince:
3.0
-
isAutomaticallyActivatePush
public boolean isAutomaticallyActivatePush()Checks whether automatic push activation is enabled.
Returns:
trueif automatic server push configuration is enabled,falseif it's no enabledSince:
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.propertiesfile with the following content:com.vaadin.experimental.collaborationEngineBackend=trueParameters:
backend- the backend to use, notnull -
getBackend
Gets the configured backend implementation.
Returns:
the backend implementation, not
nullSee 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
nullif 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, ornullto unset -
getExecutorService
Gets the configured
ExecutorServicewhich will be used to dispatch actions asynchronously. A custom executor service can be configured withsetExecutorService(ExecutorService).Returns:
the configured executor service, or
nullif not set -
setExecutorService
Sets the
ExecutorServicewhich 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, ornullto remove a previously configured one
-