public class PropertyDeploymentConfiguration extends AbstractDeploymentConfiguration
DeploymentConfiguration
based
on a base class for resolving system properties and a set of init parameters.Constructor and Description |
---|
PropertyDeploymentConfiguration(Class<?> systemPropertyBaseClass,
Properties initParameters)
Create a new property deployment configuration instance.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
getApplicationOrSystemProperty(String propertyName,
T defaultValue,
Function<String,T> converter)
Gets a configured property.
|
String |
getApplicationProperty(String parameterName)
Gets an application property value.
|
int |
getHeartbeatInterval()
Returns the number of seconds between heartbeat requests of a UI, or a
non-positive number if heartbeat is disabled.
|
Properties |
getInitParameters()
Gets the properties configured for the deployment, e.g.
|
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.
|
PushMode |
getPushMode()
Returns the mode of bidirectional ("push") client-server communication
that should be used.
|
String |
getPushURL()
Returns the URL that bidirectional ("push") client-server communication
should use.
|
protected String |
getSystemProperty(String parameterName)
Gets an system property value.
|
int |
getWebComponentDisconnect()
Returns the number of seconds that a WebComponent will wait for a
reconnect before removing the server-side component from memory.
|
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.
|
boolean |
isProductionMode()
Returns whether Vaadin is in production mode.
|
boolean |
isRequestTiming()
Returns whether the server provides timing info to the client.
|
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. |
boolean |
isSyncIdCheckEnabled()
Returns whether sync id checking is enabled.
|
boolean |
isXsrfProtectionEnabled()
Returns whether cross-site request forgery protection is enabled.
|
getClassLoaderName, getUIClassName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
disableAutomaticServletRegistration, enableDevServer, getBooleanProperty, getCompiledWebComponentsPath, getExternalStatsUrl, getPolyfills, getStringProperty, isBrotli, isEagerServerLoad, isPnpmEnabled, isStatsExternal, reuseDevServer, useV14Bootstrap
public PropertyDeploymentConfiguration(Class<?> systemPropertyBaseClass, Properties initParameters)
systemPropertyBaseClass
- the class that should be used as a basis when reading system
propertiesinitParameters
- the init parameters that should make up the foundation for
this configurationpublic <T> T getApplicationOrSystemProperty(String propertyName, T defaultValue, Function<String,T> converter)
DeploymentConfiguration
T
- type of a propertypropertyName
- 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
definedconverter
- the way string should be converted into the required propertyprotected String getSystemProperty(String parameterName)
parameterName
- the Name or the parameter.public String getApplicationProperty(String parameterName)
parameterName
- the Name or the parameter.public boolean isProductionMode()
DeploymentConfiguration
public boolean isRequestTiming()
DeploymentConfiguration
public boolean isXsrfProtectionEnabled()
DeploymentConfiguration
public boolean isSyncIdCheckEnabled()
DeploymentConfiguration
true
if sync id checking is enabled;
false
otherwisepublic int getHeartbeatInterval()
DeploymentConfiguration
public int getMaxMessageSuspendTimeout()
DeploymentConfiguration
public int getWebComponentDisconnect()
DeploymentConfiguration
public boolean isSendUrlsAsParameters()
DeploymentConfiguration
application/x-www-form-urlencoded
is enabled or not.false
if set to false or true
otherwisepublic boolean isCloseIdleSessions()
DeploymentConfiguration
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.
WrappedSession.getMaxInactiveInterval()
public PushMode getPushMode()
DeploymentConfiguration
public String getPushURL()
DeploymentConfiguration
public Properties getInitParameters()
DeploymentConfiguration
Copyright © 2020. All rights reserved.