Package com.vaadin.client
Class ApplicationConfiguration
- java.lang.Object
-
- com.vaadin.client.ApplicationConfiguration
-
public class ApplicationConfiguration extends Object
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 Constructor Description ApplicationConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetApplicationId()Gets the id generated for the application.StringgetAtmosphereJSVersion()Gets the Atmosphere JavaScript version in use.StringgetAtmosphereVersion()Gets the Atmosphere runtime version in use.StringgetContextRootUrl()Gets the URL of the context root on the server.String[]getExportedWebComponents()Gets the exported web components.intgetHeartbeatInterval()Gets the interval for heartbeat requests.StringgetLiveReloadBackend()Gets the the live reload backend technology identifier.StringgetLiveReloadUrl()Gets the URL for the live reload websocket connection.intgetMaxMessageSuspendTimeout()Gets the maximum message suspension delay.StringgetServiceUrl()Gets the URL to the server-side VaadinService.StringgetServletVersion()Gets the Vaadin servlet version in use.ErrorMessagegetSessionExpiredError()Gets the message used when a session expiration error occurs.StringgetSpringBootLiveReloadPort()Gets the Spring boot live reload port.intgetUIId()Gets the UI id of the server-side UI associated with this client-side instance.booleanisClientRouting()Checks whether the application is running vaadin-router in client.booleanisDevToolsEnabled()Gets if development tools should be added to the page.booleanisProductionMode()Checks if we are running in production mode.booleanisRequestTiming()Checks if request timing info should be made available.booleanisWebComponentMode()Checks 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.voidsetClientRouting(boolean mode)Sets whether the application is running vaadin-router in client.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.
-
-
-
Method Detail
-
getApplicationId
public String getApplicationId()
Gets the id generated for the application.- Returns:
- the id for the application
-
setApplicationId
public void setApplicationId(String applicationId)
Sets the id generated for the application.- Parameters:
applicationId- the id for the application
-
getServiceUrl
public String getServiceUrl()
Gets the URL to the server-side VaadinService.- Returns:
- the URL to the server-side service as a string
-
setServiceUrl
public void setServiceUrl(String serviceUrl)
Sets the URL to the server-side VaadinService.- Parameters:
serviceUrl- the URL to the server-side service as a string
-
getContextRootUrl
public String getContextRootUrl()
Gets the URL of the context root on the server.- Returns:
- the URL of the context root, ending with a "/"
-
setContextRootUrl
public void setContextRootUrl(String contextRootUrl)
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
-
isClientRouting
public boolean isClientRouting()
Checks whether the application is running vaadin-router in client.- Returns:
- true if vaadin-router is running.
-
setClientRouting
public void setClientRouting(boolean mode)
Sets whether the application is running vaadin-router in client.- Parameters:
mode- set to true if vaadin-router is running.
-
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
public ErrorMessage getSessionExpiredError()
Gets the message used when a session expiration error occurs.- Returns:
- the session expiration error message
-
setSessionExpiredError
public void setSessionExpiredError(ErrorMessage sessionExpiredError)
Sets the message used when a session expiration error occurs.- Parameters:
sessionExpiredError- the session expiration error message
-
getServletVersion
public String getServletVersion()
Gets the Vaadin servlet version in use.- Returns:
- the Vaadin servlet version in use
-
setServletVersion
public void setServletVersion(String servletVersion)
Sets the Vaadin servlet version in use.- Parameters:
servletVersion- the Vaadin servlet version in use
-
getAtmosphereVersion
public String getAtmosphereVersion()
Gets the Atmosphere runtime version in use.- Returns:
- the Atmosphere runtime version in use
-
setAtmosphereVersion
public void setAtmosphereVersion(String atmosphereVersion)
Sets the Atmosphere runtime version in use.- Parameters:
atmosphereVersion- the Atmosphere runtime version in use
-
getAtmosphereJSVersion
public String getAtmosphereJSVersion()
Gets the Atmosphere JavaScript version in use.- Returns:
- the Atmosphere JavaScript version in use
-
setAtmosphereJSVersion
public void setAtmosphereJSVersion(String atmosphereJSVersion)
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
public void setExportedWebComponents(String[] exportedWebComponents)
Sets the exported web components.- Parameters:
exportedWebComponents- the exported web components
-
getExportedWebComponents
public String[] 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
public String getLiveReloadUrl()
Gets the URL for the live reload websocket connection.- Returns:
- URL for the live reload websocket connection
-
setLiveReloadUrl
public void setLiveReloadUrl(String liveReloadUrl)
Sets the URL for the live reload websocket connection.- Parameters:
liveReloadUrl- URL for the live reload websocket connection
-
getLiveReloadBackend
public String getLiveReloadBackend()
Gets the the live reload backend technology identifier.- Returns:
- the live reload backend technology identifier
-
setLiveReloadBackend
public void setLiveReloadBackend(String liveReloadBackend)
Sets the live reload backend technology identifier.- Parameters:
liveReloadBackend- the live reload backend technology identifier
-
getSpringBootLiveReloadPort
public String getSpringBootLiveReloadPort()
Gets the Spring boot live reload port.- Returns:
- the Spring boot live reload port
-
setSpringBootLiveReloadPort
public void setSpringBootLiveReloadPort(String springBootLiveReloadPort)
Sets the Spring boot live reload port.- Parameters:
springBootLiveReloadPort- the Spring boot live reload port
-
-