public class CollaborationEngineConfiguration extends Object
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
.Constructor and Description |
---|
CollaborationEngineConfiguration(LicenseEventHandler licenseEventHandler)
Creates a new Collaboration Engine configuration with the provided
handler for license events.
|
Modifier and Type | Method and Description |
---|---|
Backend |
getBackend()
Gets the configured backend implementation.
|
String |
getDataDir()
Gets the configured data-directory.
|
ExecutorService |
getExecutorService()
Gets the configured
ExecutorService which will be used to
dispatch actions asynchronously. |
LicenseEventHandler |
getLicenseEventHandler()
Gets the license event handler of this configuration.
|
boolean |
isAutomaticallyActivatePush()
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)
Deprecated.
setting a backend is an experimental feature and as such
discouraged to be used in production environments
|
void |
setDataDir(String dataDir)
Sets the path to the data-directory, which is used by Collaboration
Engine to store files.
|
void |
setExecutorService(ExecutorService executorService)
Sets the
ExecutorService which will be used to dispatch actions
asynchronously. |
public CollaborationEngineConfiguration(LicenseEventHandler licenseEventHandler)
The handler will be invoked when license events occur, e.g. when the license is expired or when the end-user quota has entered the grace period. The handler can then be used for example to forward these events via e-mail or to a monitoring application to be alerted about the current status of the license.
See LicenseEvent.LicenseEventType
for a list of license event types.
licenseEventHandler
- the license event handler, not null
public LicenseEventHandler getLicenseEventHandler()
public String getDataDir()
public void setDataDir(String dataDir)
The data-directory can also be configured by setting the
vaadin.ce.dataDir
system property either in the command line or
with System.setProperty(String, String)
. If a system property is
set, it will take precedence over this setting.
dataDir
- path to the data-directorypublic void setAutomaticallyActivatePush(boolean automaticallyActivatePush)
PushMode.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.automaticallyActivatePush
- true
to automatically activate server push if
needed, false
to not make any automatic changes
to the push configurationpublic boolean isAutomaticallyActivatePush()
true
if automatic server push configuration is
enabled, false
if it's no enabledsetAutomaticallyActivatePush(boolean)
@Deprecated public void setBackend(Backend backend)
backend
- the backend to use, not null
public Backend getBackend()
null
setBackend(Backend)
public ExecutorService getExecutorService()
ExecutorService
which will be used to
dispatch actions asynchronously. A custom executor service can be
configured with setExecutorService(ExecutorService)
.null
if not setpublic void setExecutorService(ExecutorService executorService)
ExecutorService
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.executorService
- the executor service, or null
to remove a
previously configured oneCopyright © 2022. All rights reserved.