Class DefaultDeploymentConfiguration

    • Constructor Detail

      • DefaultDeploymentConfiguration

        public DefaultDeploymentConfiguration​(Class<?> systemPropertyBaseClass,
                                              Properties initParameters)
        Create a new deployment configuration instance.
        Parameters:
        systemPropertyBaseClass - the class that should be used as a basis when reading system properties
        initParameters - the init parameters that should make up the foundation for this configuration
    • Method Detail

      • getApplicationOrSystemProperty

        public String getApplicationOrSystemProperty​(String propertyName,
                                                     String defaultValue)
        Description copied from interface: DeploymentConfiguration
        Gets a configured property. The properties are typically read from e.g. web.xml or from system properties of the JVM.
        Parameters:
        propertyName - The simple of the property, in some contexts, lookup might be performed using variations of the provided name.
        defaultValue - the default value that should be used if no value has been defined
        Returns:
        the property value, or the passed default value if no property value is found
      • getSystemProperty

        protected String getSystemProperty​(String parameterName)
        Gets an system property value.
        Parameters:
        parameterName - the Name or the parameter.
        Returns:
        String value or null if not found
      • getApplicationProperty

        public String getApplicationProperty​(String parameterName)
        Gets an application property value.
        Parameters:
        parameterName - the Name or the parameter.
        Returns:
        String value or null if not found
      • isProductionMode

        public boolean isProductionMode()
        Returns whether Vaadin is in production mode. The default is false.
        Returns:
        true if in production mode, false otherwise.
      • isXsrfProtectionEnabled

        public boolean isXsrfProtectionEnabled()
        Returns whether cross-site request forgery protection is enabled.

        The default is true.

        Returns:
        true if XSRF protection is enabled, false otherwise.
      • getResourceCacheTime

        public int getResourceCacheTime()
        Returns the time resources can be cached in the browsers, in seconds.

        The default interval is 3600 seconds (1 hour).

        Returns:
        The resource cache time.
      • getHeartbeatInterval

        public int getHeartbeatInterval()
        Returns the number of seconds between heartbeat requests of a UI, or a non-positive number if heartbeat is disabled.

        The default interval is 300 seconds (5 minutes).

        Returns:
        The time between heartbeats.
      • isCloseIdleSessions

        public boolean isCloseIdleSessions()
        Returns whether a session should be closed when all its open UIs have been idle for longer than its configured maximum inactivity time.

        A UI is idle if it is open on the client side but has no activity other than heartbeat requests. If isCloseIdleSessions() == false, heartbeat requests cause the session to stay open for as long as there are open UIs on the client side. If it is true, the session is eventually closed if the open UIs do not have any user interaction.

        The default value is false.

        Returns:
        True if UIs and sessions receiving only heartbeat requests are eventually closed; false if heartbeat requests extend UI and session lifetime indefinitely.
        See Also:
        WrappedSession.getMaxInactiveInterval()
      • isSyncIdCheckEnabled

        public boolean isSyncIdCheckEnabled()
        Returns whether sync id checking is enabled. The sync id is used to gracefully handle situations when the client sends a message to a connector that has recently been removed on the server.

        The default value is true.

        Returns:
        true if sync id checking is enabled; false otherwise
      • isSendUrlsAsParameters

        public boolean isSendUrlsAsParameters()
        Returns whether the sending of URL's as GET and POST parameters in requests with content-type application/x-www-form-urlencoded is enabled or not.

        The default value is true.

        Returns:
        false if set to false or true otherwise
      • getPushMode

        public PushMode getPushMode()
        Returns the mode of bidirectional ("push") client-server communication that should be used.

        The default mode is PushMode.DISABLED.

        Returns:
        The push mode in use.
      • getInitParameters

        public Properties getInitParameters()
        Description copied from interface: DeploymentConfiguration
        Gets the properties configured for the deployment, e.g. as init parameters to the servlet or portlet.
        Returns:
        properties for the application.