com.vaadin.flow.server.

Class PropertyDeploymentConfiguration

    • Constructor Detail

      • PropertyDeploymentConfiguration

        public PropertyDeploymentConfiguration(Class<?> systemPropertyBaseClass,
                                               Properties initParameters)

        Create a new property 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 <T> T getApplicationOrSystemProperty(String propertyName,
                                                    T defaultValue,
                                                    Function<String,T> converter)

        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.

        Type Parameters:

        T - type of a property

        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

        converter - the way string should be converted into the required property

        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()

        Description copied from interface: DeploymentConfiguration

        Returns whether Vaadin is in production mode.

        Returns:

        true if in production mode, false otherwise.

      • isRequestTiming

        public boolean isRequestTiming()

        Description copied from interface: DeploymentConfiguration

        Returns whether the server provides timing info to the client.

        Returns:

        true if timing info is provided, false otherwise.

      • isXsrfProtectionEnabled

        public boolean isXsrfProtectionEnabled()

        Description copied from interface: DeploymentConfiguration

        Returns whether cross-site request forgery protection is enabled.

        Returns:

        true if XSRF protection is enabled, false otherwise.

      • isSyncIdCheckEnabled

        public boolean isSyncIdCheckEnabled()

        Description copied from interface: DeploymentConfiguration

        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.

        Returns:

        true if sync id checking is enabled; false otherwise

      • getHeartbeatInterval

        public int getHeartbeatInterval()

        Description copied from interface: DeploymentConfiguration

        Returns the number of seconds between heartbeat requests of a UI, or a non-positive number if heartbeat is disabled.

        Returns:

        The time between heartbeats.

      • getMaxMessageSuspendTimeout

        public int getMaxMessageSuspendTimeout()

        Description copied from interface: DeploymentConfiguration

        In certain cases, such as when combining XmlHttpRequests and push over low bandwidth connections, messages may be received out of order by the client. This property specifies the maximum time (in milliseconds) that the client will then wait for the predecessors of a received out-order message, before considering them missing and requesting a full resynchronization of the application state from the server.

        Returns:

        The maximum message suspension timeout

      • getWebComponentDisconnect

        public int getWebComponentDisconnect()

        Description copied from interface: DeploymentConfiguration

        Returns the number of seconds that a WebComponent will wait for a reconnect before removing the server-side component from memory.

        Returns:

        time to wait after a disconnect has happened

      • isSendUrlsAsParameters

        public boolean isSendUrlsAsParameters()

        Description copied from interface: DeploymentConfiguration

        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.

        Returns:

        false if set to false or true otherwise

      • isCloseIdleSessions

        public boolean isCloseIdleSessions()

        Description copied from interface: DeploymentConfiguration

        Returns whether a Vaadin 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.

        Returns:

        True if UIs and Vaadin sessions receiving only heartbeat requests are eventually closed; false if heartbeat requests extend UI and session lifetime indefinitely.

        See Also:

        WrappedSession.getMaxInactiveInterval()

      • getPushMode

        public PushMode getPushMode()

        Description copied from interface: DeploymentConfiguration

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

        Returns:

        The push mode in use.

      • getPushURL

        public String getPushURL()

        Description copied from interface: DeploymentConfiguration

        Returns the URL that bidirectional ("push") client-server communication should use.

        Returns:

        The push URL to 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.

        Returns:

        properties for the application.

      • isDevModeLiveReloadEnabled

        public boolean isDevModeLiveReloadEnabled()

        DevModeLiveReload status. Disabled in 3.1

        Returns:

        false