com.vaadin.server
Interface DeploymentConfiguration

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
DefaultDeploymentConfiguration

public interface DeploymentConfiguration
extends java.io.Serializable

A collection of properties configured at deploy time as well as a way of accessing third party properties not explicitly supported by this class.

Since:
7.0.0
Version:
@VERSION@
Author:
Vaadin Ltd

Nested Class Summary
static class DeploymentConfiguration.LegacyProperyToStringMode
          Deprecated. 
 
Method Summary
 java.lang.String getApplicationOrSystemProperty(java.lang.String propertyName, java.lang.String defaultValue)
          Gets a configured property.
 int getHeartbeatInterval()
          Returns the number of seconds between heartbeat requests of a UI, or a non-positive number if heartbeat is disabled.
 java.util.Properties getInitParameters()
          Gets the properties configured for the deployment, e.g.
 DeploymentConfiguration.LegacyProperyToStringMode getLegacyPropertyToStringMode()
          Deprecated. 
 com.vaadin.shared.communication.PushMode getPushMode()
          Returns the mode of bidirectional ("push") client-server communication that should be used.
 int getResourceCacheTime()
          Returns the time resources can be cached in the browsers, in seconds.
 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.
 boolean isProductionMode()
          Returns whether Vaadin is in production mode.
 boolean isSyncIdCheckEnabled()
          Returns whether sync id checking is enabled.
 boolean isXsrfProtectionEnabled()
          Returns whether cross-site request forgery protection is enabled.
 

Method Detail

isProductionMode

boolean isProductionMode()
Returns whether Vaadin is in production mode.

Returns:
true if in production mode, false otherwise.

isXsrfProtectionEnabled

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

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

isSyncIdCheckEnabled

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.

Returns:
true if sync id checking is enabled; false otherwise
Since:
7.3

getResourceCacheTime

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

Returns:
The resource cache time.

getHeartbeatInterval

int getHeartbeatInterval()
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.

isCloseIdleSessions

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.

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

getPushMode

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

Returns:
The push mode in use.

getInitParameters

java.util.Properties getInitParameters()
Gets the properties configured for the deployment, e.g. as init parameters to the servlet or portlet.

Returns:
properties for the application.

getApplicationOrSystemProperty

java.lang.String getApplicationOrSystemProperty(java.lang.String propertyName,
                                                java.lang.String defaultValue)
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

getLegacyPropertyToStringMode

@Deprecated
DeploymentConfiguration.LegacyProperyToStringMode getLegacyPropertyToStringMode()
Deprecated. 

Returns to legacy Property.toString() mode used. See AbstractProperty#isLegacyToStringEnabled() for more information.

Returns:
The Property.toString() mode in use.


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.