Class CollaborationEngineConfiguration

    • Constructor Detail

      • CollaborationEngineConfiguration

        public CollaborationEngineConfiguration​(LicenseEventHandler licenseEventHandler)
        Creates a new Collaboration Engine configuration with the provided handler for license events.

        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.

        Parameters:
        licenseEventHandler - the license event handler, not null
        Since:
        3.0
    • Method Detail

      • getLicenseEventHandler

        public LicenseEventHandler getLicenseEventHandler()
        Gets the license event handler of this configuration.
        Returns:
        the license event handler
        Since:
        3.0
      • getDataDir

        public String getDataDir()
        Gets the configured data-directory.
        Returns:
        the data-directory
        Since:
        3.0
      • setDataDir

        public void setDataDir​(String dataDir)
        Sets 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 with System.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

        public String getBeaconPath()
        Gets the configured beacon path.
        Returns:
        the beacon path
      • setBeaconPath

        public void setBeaconPath​(String beaconPath)
        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 with System.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.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:
        setAutomaticallyActivatePush(boolean)
      • setBackend

        @Deprecated
        public void setBackend​(Backend backend)
        Deprecated.
        setting a backend is an experimental feature and as such discouraged to be used in production environments
        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.
        Parameters:
        backend - the backend to use, not null
      • getBackend

        public Backend getBackend()
        Gets the configured backend implementation.
        Returns:
        the backend implementation, not null
        See Also:
        setBackend(Backend)
      • getLicenseStorage

        public LicenseStorage getLicenseStorage()
        Gets the configured license-storage implementation.
        Returns:
        the license-storage implementation, or null if not configured
      • setLicenseStorage

        public void setLicenseStorage​(LicenseStorage licenseStorage)
        Sets a configured license-storage implementation.
        Parameters:
        licenseStorage - the license-storage implementation, or null to unset
      • setExecutorService

        public void setExecutorService​(ExecutorService executorService)
        Sets the 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.
        Parameters:
        executorService - the executor service, or null to remove a previously configured one