com.vaadin.annotations
Annotation Type VaadinServletConfiguration


@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface VaadinServletConfiguration

Annotation for configuring subclasses of VaadinServlet. For a VaadinServlet class that has this annotation, the defined values are read during initialization and will be available using DeploymentConfiguration.getApplicationOrSystemProperty(String, String) as well as from specific methods in DeploymentConfiguration. Init params defined in web.xml or the @WebServlet annotation take precedence over values defined in this annotation.

Since:
7.1
Author:
Vaadin Ltd

Required Element Summary
 boolean productionMode
          Whether Vaadin is in production mode.
 java.lang.Class<? extends UI> ui
          Gets the default UI class to use for the servlet.
 
Optional Element Summary
 boolean closeIdleSessions
          Whether a session should be closed when all its open UIs have been idle for longer than its configured maximum inactivity time.
 int heartbeatInterval
          The number of seconds between heartbeat requests of a UI, or a non-positive number if heartbeat is disabled.
 DeploymentConfiguration.LegacyProperyToStringMode legacyPropertyToStringMode
          Deprecated. as of 7.1, should only be used to ease migration
 int resourceCacheTime
          The time resources can be cached in the browser, in seconds.
 java.lang.String widgetset
          The default widgetset to use for the servlet.
 

Element Detail

productionMode

@VaadinServletConfiguration.InitParameterName(value="productionMode")
public abstract boolean productionMode
Whether Vaadin is in production mode.

Returns:
true if in production mode, false otherwise.
See Also:
DeploymentConfiguration.isProductionMode()

ui

@VaadinServletConfiguration.InitParameterName(value="UI")
public abstract java.lang.Class<? extends UI> ui
Gets the default UI class to use for the servlet.

Returns:
the default UI class

resourceCacheTime

@VaadinServletConfiguration.InitParameterName(value="resourceCacheTime")
public abstract int resourceCacheTime
The time resources can be cached in the browser, in seconds. The default value is 3600 seconds, i.e. one hour.

Returns:
the resource cache time
See Also:
DeploymentConfiguration.getResourceCacheTime()
Default:
3600

heartbeatInterval

@VaadinServletConfiguration.InitParameterName(value="heartbeatInterval")
public abstract int heartbeatInterval
The number of seconds between heartbeat requests of a UI, or a non-positive number if heartbeat is disabled. The default value is 300 seconds, i.e. 5 minutes.

Returns:
the time between heartbeats
See Also:
DeploymentConfiguration.getHeartbeatInterval()
Default:
300

closeIdleSessions

@VaadinServletConfiguration.InitParameterName(value="closeIdleSessions")
public abstract boolean closeIdleSessions
Whether a session should be closed when all its open UIs have been idle for longer than its configured maximum inactivity time. 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:
DeploymentConfiguration.isCloseIdleSessions()
Default:
false

widgetset

@VaadinServletConfiguration.InitParameterName(value="widgetset")
public abstract java.lang.String widgetset
The default widgetset to use for the servlet. The default value is com.vaadin.DefaultWidgetSet.

Returns:
the default widgetset name
Default:
"com.vaadin.DefaultWidgetSet"

legacyPropertyToStringMode

@Deprecated
@VaadinServletConfiguration.InitParameterName(value="legacyPropertyToString")
public abstract DeploymentConfiguration.LegacyProperyToStringMode legacyPropertyToStringMode
Deprecated. as of 7.1, should only be used to ease migration

The legacy Property.toString() mode used. The default value is DeploymentConfiguration.LegacyProperyToStringMode.DISABLED

Returns:
The Property.toString() mode in use.
Default:
com.vaadin.server.DeploymentConfiguration.LegacyProperyToStringMode.DISABLED


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