Class DefaultDeploymentConfiguration
- All Implemented Interfaces:
DeploymentConfiguration,AbstractConfiguration,Serializable
DeploymentConfiguration based on a base
class for resolving system properties and a set of init parameters.- Since:
- 1.0
- Author:
- Vaadin Ltd
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanDefault value forisCloseIdleSessions()= false .static final intDefault value forgetHeartbeatInterval()= 300 .static final intDefault value forgetMaxMessageSuspendTimeout()()} = 5000 .static final booleanstatic final booleanDefault value forisSyncIdCheckEnabled()= true .static final intDefault value forgetWebComponentDisconnect()= 300.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionDefaultDeploymentConfiguration(ApplicationConfiguration parentConfig, Class<?> systemPropertyBaseClass, Properties initParameters) Create a new deployment configuration instance. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of seconds between heartbeat requests of a UI, or a non-positive number if heartbeat is disabled.intIn certain cases, such as when combining XmlHttpRequests and push over low bandwidth connections, messages may be received out of order by the client.Returns the mode of bidirectional ("push") client-server communication that should be used.Returns the servlet mapping that bidirectional ("push") client-server communication should use.Returns the strategy for Vaadin session lock checking in production mode.intReturns the number of seconds that a WebComponent will wait for a reconnect before removing the server-side component from memory.booleanReturns whether a Vaadin session should be closed when all its open UIs have been idle for longer than its configured maximum inactivity time.booleanReturns whether Vaadin is in production mode.booleanReturns whether the server provides timing info to the client.booleanReturns whether the sending of URL's as GET and POST parameters in requests with content-typeapplication/x-www-form-urlencodedis enabled or not.booleanReturns whether sync id checking is enabled.booleanReturns whether cross-site request forgery protection is enabled.Methods inherited from class com.vaadin.flow.server.PropertyDeploymentConfiguration
getApplicationProperty, getBuildFolder, getFrontendFolder, getInitParameters, getJavaResourceFolder, getJavaSourceFolder, getOutputResourceFolder, getParentConfiguration, getSystemProperty, isBunEnabled, isDevModeLiveReloadEnabled, isDevToolsEnabled, isGlobalPnpm, isOwnProperty, isPnpmEnabled, isUsageStatisticsEnabled, reuseDevServerMethods inherited from class com.vaadin.flow.server.AbstractDeploymentConfiguration
getClassLoaderName, getUIClassNameMethods inherited from class com.vaadin.flow.server.AbstractPropertyConfiguration
getApplicationOrSystemProperty, getApplicationProperty, getBooleanProperty, getProperties, getStringPropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.server.AbstractConfiguration
getMode, getProjectFolder, getStringPropertyMethods inherited from interface com.vaadin.flow.function.DeploymentConfiguration
getApplicationName, getApplicationOrSystemProperty, getBooleanProperty, getCompiledWebComponentsPath, getExternalStatsUrl, getPolyfills, isBrotli, isEagerServerLoad, isReactEnabled, isStatsExternal
-
Field Details
-
NOT_PRODUCTION_MODE_INFO
- See Also:
-
WARNING_XSRF_PROTECTION_DISABLED
- See Also:
-
WARNING_HEARTBEAT_INTERVAL_NOT_NUMERIC
- See Also:
-
WARNING_PUSH_MODE_NOT_RECOGNIZED
- See Also:
-
WARNING_SESSION_LOCK_CHECK_STRATEGY_NOT_RECOGNIZED
-
DEFAULT_HEARTBEAT_INTERVAL
public static final int DEFAULT_HEARTBEAT_INTERVALDefault value forgetHeartbeatInterval()= 300 .- See Also:
-
DEFAULT_MAX_MESSAGE_SUSPEND_TIMEOUT
public static final int DEFAULT_MAX_MESSAGE_SUSPEND_TIMEOUTDefault value forgetMaxMessageSuspendTimeout()()} = 5000 .- See Also:
-
DEFAULT_WEB_COMPONENT_DISCONNECT
public static final int DEFAULT_WEB_COMPONENT_DISCONNECTDefault value forgetWebComponentDisconnect()= 300.- See Also:
-
DEFAULT_CLOSE_IDLE_SESSIONS
public static final boolean DEFAULT_CLOSE_IDLE_SESSIONSDefault value forisCloseIdleSessions()= false .- See Also:
-
DEFAULT_SYNC_ID_CHECK
public static final boolean DEFAULT_SYNC_ID_CHECKDefault value forisSyncIdCheckEnabled()= true .- See Also:
-
DEFAULT_SEND_URLS_AS_PARAMETERS
public static final boolean DEFAULT_SEND_URLS_AS_PARAMETERS- See Also:
-
-
Constructor Details
-
DefaultDeploymentConfiguration
public DefaultDeploymentConfiguration(ApplicationConfiguration parentConfig, Class<?> systemPropertyBaseClass, Properties initParameters) Create a new deployment configuration instance.- Parameters:
parentConfig- a parent application configurationsystemPropertyBaseClass- the class that should be used as a basis when reading system propertiesinitParameters- the init parameters that should make up the foundation for this configuration
-
-
Method Details
-
isProductionMode
public boolean isProductionMode()Returns whether Vaadin is in production mode.The default is false.
- Specified by:
isProductionModein interfaceAbstractConfiguration- Overrides:
isProductionModein classPropertyDeploymentConfiguration- Returns:
- true if in production mode, false otherwise.
-
isRequestTiming
public boolean isRequestTiming()Returns whether the server provides timing info to the client.The default is
truewhen not in production andfalsewhen in production mode.- Specified by:
isRequestTimingin interfaceDeploymentConfiguration- Overrides:
isRequestTimingin classPropertyDeploymentConfiguration- Returns:
- true if timing info is provided, false otherwise.
-
isXsrfProtectionEnabled
public boolean isXsrfProtectionEnabled()Returns whether cross-site request forgery protection is enabled.The default is true.
- Specified by:
isXsrfProtectionEnabledin interfaceAbstractConfiguration- Overrides:
isXsrfProtectionEnabledin classPropertyDeploymentConfiguration- Returns:
- true if XSRF protection is enabled, false otherwise.
-
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).
- Specified by:
getHeartbeatIntervalin interfaceDeploymentConfiguration- Overrides:
getHeartbeatIntervalin classPropertyDeploymentConfiguration- Returns:
- The time between heartbeats.
-
getMaxMessageSuspendTimeout
public int getMaxMessageSuspendTimeout()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.The default max message suspension time is 5000 milliseconds.
- Specified by:
getMaxMessageSuspendTimeoutin interfaceDeploymentConfiguration- Overrides:
getMaxMessageSuspendTimeoutin classPropertyDeploymentConfiguration- Returns:
- The maximum message suspension timeout
-
getWebComponentDisconnect
public int getWebComponentDisconnect()Description copied from interface:DeploymentConfigurationReturns the number of seconds that a WebComponent will wait for a reconnect before removing the server-side component from memory.- Specified by:
getWebComponentDisconnectin interfaceDeploymentConfiguration- Overrides:
getWebComponentDisconnectin classPropertyDeploymentConfiguration- Returns:
- time to wait after a disconnect has happened
-
isCloseIdleSessions
public boolean isCloseIdleSessions()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 istrue, the session is eventually closed if the open UIs do not have any user interaction.The default value is false.
- Specified by:
isCloseIdleSessionsin interfaceDeploymentConfiguration- Overrides:
isCloseIdleSessionsin classPropertyDeploymentConfiguration- 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:
-
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.- Specified by:
isSyncIdCheckEnabledin interfaceDeploymentConfiguration- Overrides:
isSyncIdCheckEnabledin classPropertyDeploymentConfiguration- Returns:
trueif sync id checking is enabled;falseotherwise
-
isSendUrlsAsParameters
public boolean isSendUrlsAsParameters()Returns whether the sending of URL's as GET and POST parameters in requests with content-typeapplication/x-www-form-urlencodedis enabled or not.The default value is
true.- Specified by:
isSendUrlsAsParametersin interfaceDeploymentConfiguration- Overrides:
isSendUrlsAsParametersin classPropertyDeploymentConfiguration- Returns:
falseif set to false ortrueotherwise
-
getPushMode
Returns the mode of bidirectional ("push") client-server communication that should be used.The default mode is
PushMode.DISABLED.- Specified by:
getPushModein interfaceDeploymentConfiguration- Overrides:
getPushModein classPropertyDeploymentConfiguration- Returns:
- The push mode in use.
-
getPushServletMapping
Returns the servlet mapping that bidirectional ("push") client-server communication should use.The default mode is
""which uses the service mapping.- Returns:
- The push servlet mapping to use
-
getSessionLockCheckStrategy
Description copied from interface:DeploymentConfigurationReturns the strategy for Vaadin session lock checking in production mode. Ignored in development mode. By default, it returnsSessionLockCheckStrategy.ASSERT.- Specified by:
getSessionLockCheckStrategyin interfaceDeploymentConfiguration- Overrides:
getSessionLockCheckStrategyin classPropertyDeploymentConfiguration- Returns:
- the lock checking strategy, never null.
-