Package com.vaadin.client
Class ApplicationConfiguration
java.lang.Object
com.vaadin.client.ApplicationConfiguration
Application configuration data.
This class is effectively immutable although setters exist to assign the values during construction.
- Since:
- 1.0
- Author:
- Vaadin Ltd
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the id generated for the application.Gets the Atmosphere JavaScript version in use.Gets the Atmosphere runtime version in use.Gets the URL of the context root on the server.String[]Gets the exported web components.intGets the interval for heartbeat requests.Gets the the live reload backend technology identifier.Gets the URL for the live reload websocket connection.intGets the maximum message suspension delay.Gets the URL to the server-side VaadinService.Gets the Vaadin servlet version in use.Gets the message used when a session expiration error occurs.Gets the Spring boot live reload port.intgetUIId()Gets the UI id of the server-side UI associated with this client-side instance.booleanGets if development tools should be added to the page.booleanChecks if we are running in production mode.booleanChecks if request timing info should be made available.booleanChecks whether the application is running as a web-component in the page.voidsetApplicationId(String applicationId) Sets the id generated for the application.voidsetAtmosphereJSVersion(String atmosphereJSVersion) Sets the Atmosphere JavaScript version in use.voidsetAtmosphereVersion(String atmosphereVersion) Sets the Atmosphere runtime version in use.voidsetContextRootUrl(String contextRootUrl) Sets the URL of the context root on the server.voidsetDevToolsEnabled(boolean devToolsEnabled) Sets if development tools should be added to the page.voidsetExportedWebComponents(String[] exportedWebComponents) Sets the exported web components.voidsetHeartbeatInterval(int heartbeatInterval) Sets the interval for heartbeat requests.voidsetLiveReloadBackend(String liveReloadBackend) Sets the live reload backend technology identifier.voidsetLiveReloadUrl(String liveReloadUrl) Sets the URL for the live reload websocket connection.voidsetMaxMessageSuspendTimeout(int maxMessageSuspendTimeout) Sets the maximum message suspension delay.voidsetProductionMode(boolean productionMode) Sets whether we are running in production mode.voidsetRequestTiming(boolean requestTiming) Sets whether request timing info should be made available.voidsetServiceUrl(String serviceUrl) Sets the URL to the server-side VaadinService.voidsetServletVersion(String servletVersion) Sets the Vaadin servlet version in use.voidsetSessionExpiredError(ErrorMessage sessionExpiredError) Sets the message used when a session expiration error occurs.voidsetSpringBootLiveReloadPort(String springBootLiveReloadPort) Sets the Spring boot live reload port.voidsetUIId(int uiId) Sets the UI id of the server-side UI associated with this client-side instance.voidsetWebComponentMode(boolean mode) Sets whether the application is running as a web-component in the page.
-
Constructor Details
-
ApplicationConfiguration
public ApplicationConfiguration()
-
-
Method Details
-
getApplicationId
Gets the id generated for the application.- Returns:
- the id for the application
-
setApplicationId
Sets the id generated for the application.- Parameters:
applicationId- the id for the application
-
getServiceUrl
Gets the URL to the server-side VaadinService.- Returns:
- the URL to the server-side service as a string
-
setServiceUrl
Sets the URL to the server-side VaadinService.- Parameters:
serviceUrl- the URL to the server-side service as a string
-
getContextRootUrl
Gets the URL of the context root on the server.- Returns:
- the URL of the context root, ending with a "/"
-
setContextRootUrl
Sets the URL of the context root on the server.- Parameters:
contextRootUrl- the URL of the context root, ending with a "/"
-
isWebComponentMode
public boolean isWebComponentMode()Checks whether the application is running as a web-component in the page.- Returns:
- true in case the app is a WC
-
setWebComponentMode
public void setWebComponentMode(boolean mode) Sets whether the application is running as a web-component in the page.- Parameters:
mode- set to true if it's a WC
-
getUIId
public int getUIId()Gets the UI id of the server-side UI associated with this client-side instance. The UI id should be included in every request originating from this instance in order to associate the request with the right UI instance on the server.- Returns:
- the UI id
-
setUIId
public void setUIId(int uiId) Sets the UI id of the server-side UI associated with this client-side instance.- Parameters:
uiId- the UI id
-
getHeartbeatInterval
public int getHeartbeatInterval()Gets the interval for heartbeat requests.- Returns:
- The interval in seconds between heartbeat requests, or -1 if heartbeat is disabled.
-
setHeartbeatInterval
public void setHeartbeatInterval(int heartbeatInterval) Sets the interval for heartbeat requests.- Parameters:
heartbeatInterval- The interval in seconds between heartbeat requests, or -1 if heartbeat is disabled.
-
getMaxMessageSuspendTimeout
public int getMaxMessageSuspendTimeout()Gets the maximum message suspension delay.- Returns:
- The maximum time, in milliseconds, to suspend out-of-order messages waiting for their predecessor before resynchronizing.
-
setMaxMessageSuspendTimeout
public void setMaxMessageSuspendTimeout(int maxMessageSuspendTimeout) Sets the maximum message suspension delay.- Parameters:
maxMessageSuspendTimeout- The maximum time, in milliseconds, to suspend out-of-order messages waiting for their predecessor before resynchronizing.
-
getSessionExpiredError
Gets the message used when a session expiration error occurs.- Returns:
- the session expiration error message
-
setSessionExpiredError
Sets the message used when a session expiration error occurs.- Parameters:
sessionExpiredError- the session expiration error message
-
getServletVersion
Gets the Vaadin servlet version in use.- Returns:
- the Vaadin servlet version in use
-
setServletVersion
Sets the Vaadin servlet version in use.- Parameters:
servletVersion- the Vaadin servlet version in use
-
getAtmosphereVersion
Gets the Atmosphere runtime version in use.- Returns:
- the Atmosphere runtime version in use
-
setAtmosphereVersion
Sets the Atmosphere runtime version in use.- Parameters:
atmosphereVersion- the Atmosphere runtime version in use
-
getAtmosphereJSVersion
Gets the Atmosphere JavaScript version in use.- Returns:
- the Atmosphere JavaScript version in use
-
setAtmosphereJSVersion
Sets the Atmosphere JavaScript version in use.- Parameters:
atmosphereJSVersion- the Atmosphere JavaScript version in use
-
isProductionMode
public boolean isProductionMode()Checks if we are running in production mode.With production mode disabled, a lot more information is logged to the browser console. In production you should always enable production mode, because logging and other debug features can have a significant performance impact.
- Returns:
trueif production mode is enabled,falseotherwise
-
isRequestTiming
public boolean isRequestTiming()Checks if request timing info should be made available.- Returns:
trueif request timing info should be made availble,falseotherwise
-
setProductionMode
public void setProductionMode(boolean productionMode) Sets whether we are running in production mode.With production mode disabled, a lot more information is logged to the browser console. In production you should always enable production mode, because logging and other debug features can have a significant performance impact.
- Parameters:
productionMode-trueif production mode is enabled,falseotherwise
-
setRequestTiming
public void setRequestTiming(boolean requestTiming) Sets whether request timing info should be made available.- Parameters:
requestTiming-trueif request timing info should be made available,falseotherwise
-
setExportedWebComponents
Sets the exported web components.- Parameters:
exportedWebComponents- the exported web components
-
getExportedWebComponents
Gets the exported web components.- Returns:
- the exported web components
-
isDevToolsEnabled
public boolean isDevToolsEnabled()Gets if development tools should be added to the page.- Returns:
- whether development tools should be added
-
setDevToolsEnabled
public void setDevToolsEnabled(boolean devToolsEnabled) Sets if development tools should be added to the page.- Parameters:
devToolsEnabled- whether development tools should be added
-
getLiveReloadUrl
Gets the URL for the live reload websocket connection.- Returns:
- URL for the live reload websocket connection
-
setLiveReloadUrl
Sets the URL for the live reload websocket connection.- Parameters:
liveReloadUrl- URL for the live reload websocket connection
-
getLiveReloadBackend
Gets the the live reload backend technology identifier.- Returns:
- the live reload backend technology identifier
-
setLiveReloadBackend
Sets the live reload backend technology identifier.- Parameters:
liveReloadBackend- the live reload backend technology identifier
-
getSpringBootLiveReloadPort
Gets the Spring boot live reload port.- Returns:
- the Spring boot live reload port
-
setSpringBootLiveReloadPort
Sets the Spring boot live reload port.- Parameters:
springBootLiveReloadPort- the Spring boot live reload port
-