|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vaadin.server.VaadinService
com.vaadin.server.VaadinServletService
public class VaadinServletService
Field Summary |
---|
Fields inherited from class com.vaadin.server.VaadinService |
---|
URL_PARAMETER_CLOSE_APPLICATION, URL_PARAMETER_RESTART_APPLICATION |
Constructor Summary | |
---|---|
VaadinServletService(VaadinServlet servlet,
DeploymentConfiguration deploymentConfiguration)
|
Method Summary | |
---|---|
protected java.util.List<RequestHandler> |
createRequestHandlers()
Called during initialization to add the request handlers for the service. |
boolean |
ensurePushAvailable()
Enables push if push support is available and push has not yet been enabled. |
protected java.net.URL |
getApplicationUrl(VaadinRequest request)
Get the base URL that should be used for sending requests back to this service. |
java.io.File |
getBaseDirectory()
Returns the context base directory. |
static java.lang.String |
getCancelingRelativePath(java.lang.String pathToCancel)
Gets a relative path that cancels the provided path. |
java.lang.String |
getConfiguredTheme(VaadinRequest request)
Gets the theme that is configured for this deployment, e.g. |
java.lang.String |
getConfiguredWidgetset(VaadinRequest request)
Gets the widgetset that is configured for this deployment, e.g. |
static VaadinServletResponse |
getCurrentResponse()
|
static javax.servlet.http.HttpServletRequest |
getCurrentServletRequest()
|
java.lang.String |
getMainDivId(VaadinSession session,
VaadinRequest request,
java.lang.Class<? extends UI> uiClass)
Creates and returns a unique ID for the DIV where the UI is to be rendered. |
java.lang.String |
getMimeType(java.lang.String resourceName)
Returns the MIME type of the specified file, or null if the MIME type is not known. |
java.lang.String |
getServiceName()
Gets a unique name for this service. |
VaadinServlet |
getServlet()
Retrieves a reference to the servlet associated with this service. |
java.lang.String |
getStaticFileLocation(VaadinRequest request)
Return the URL from where static files, e.g. |
java.io.InputStream |
getThemeResourceAsStream(UI uI,
java.lang.String themeName,
java.lang.String resource)
TODO PUSH Document TODO Pass UI or VaadinSession? |
boolean |
isStandalone(VaadinRequest request)
Checks whether the UI will be rendered on its own in the browser or whether it will be included into some other context. |
protected boolean |
requestCanCreateSession(VaadinRequest request)
Checks whether it's valid to create a new service session as a result of the given request. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VaadinServletService(VaadinServlet servlet, DeploymentConfiguration deploymentConfiguration) throws ServiceException
ServiceException
Method Detail |
---|
protected java.util.List<RequestHandler> createRequestHandlers() throws ServiceException
VaadinService
createRequestHandlers
in class VaadinService
ServiceException
- if a problem occurs when creating the request handlerspublic VaadinServlet getServlet()
public java.lang.String getStaticFileLocation(VaadinRequest request)
VaadinService
getStaticFileLocation
in class VaadinService
request
- the request for which the location should be determined
public static java.lang.String getCancelingRelativePath(java.lang.String pathToCancel)
pathToCancel
- the path that should be canceled
public java.lang.String getConfiguredWidgetset(VaadinRequest request)
VaadinService
getConfiguredWidgetset
in class VaadinService
request
- the request for which a widgetset is required
public java.lang.String getConfiguredTheme(VaadinRequest request)
VaadinService
getConfiguredTheme
in class VaadinService
request
- the request for which a theme is required
public boolean isStandalone(VaadinRequest request)
VaadinService
isStandalone
in class VaadinService
request
- the request for which the UI is loaded
public java.lang.String getMimeType(java.lang.String resourceName)
VaadinService
getMimeType
in class VaadinService
resourceName
- a String specifying the name of a file
ServletContext.getMimeType(String)
,
PortletContext.getMimeType(String)
public java.io.File getBaseDirectory()
VaadinService
getBaseDirectory
in class VaadinService
protected boolean requestCanCreateSession(VaadinRequest request)
VaadinService
requestCanCreateSession
in class VaadinService
request
- the request
true
if it's valid to create a new service session
for the request; else false
protected java.net.URL getApplicationUrl(VaadinRequest request) throws java.net.MalformedURLException
VaadinService
This is only used to support legacy cases.
getApplicationUrl
in class VaadinService
java.net.MalformedURLException
public static javax.servlet.http.HttpServletRequest getCurrentServletRequest()
public static VaadinServletResponse getCurrentResponse()
public java.lang.String getServiceName()
VaadinService
getServiceName
in class VaadinService
public java.io.InputStream getThemeResourceAsStream(UI uI, java.lang.String themeName, java.lang.String resource)
VaadinService
getThemeResourceAsStream
in class VaadinService
public java.lang.String getMainDivId(VaadinSession session, VaadinRequest request, java.lang.Class<? extends UI> uiClass)
VaadinService
getMainDivId
in class VaadinService
session
- The service session to which the bootstrapped UI will belong.request
- The request for which a div id is neededuiClass
- The class of the UI that will be bootstrapped
public boolean ensurePushAvailable()
VaadinService
ensurePushAvailable
in class VaadinService
true
if push can be used; false
if push
is not available.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |