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 |
---|---|
String |
getDataDir()
Gets the configured data-directory.
|
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 |
setDataDir(String dataDir)
Sets the path to the data-directory, which is used by Collaboration
Engine to store files.
|
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)
Copyright © 2021. All rights reserved.