com.vaadin.server.
Class BootstrapHandler
- java.lang.Object
-
- com.vaadin.server.SynchronizedRequestHandler
-
- com.vaadin.server.BootstrapHandler
-
All Implemented Interfaces:
Direct Known Subclasses:
@Deprecated public abstract class BootstrapHandler extends SynchronizedRequestHandler
Deprecated.As of 7.0. Will likely change or be removed in a future versionHandles the initial request to start the application.
Since:
7.0.0
Author:
Vaadin Ltd
See Also:
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
BootstrapHandler.BootstrapContext
Deprecated.
Provides context information for the bootstrap process.
protected static class
BootstrapHandler.BootstrapUriResolver
Deprecated.
The URI resolver used in the bootstrap process.
-
Nested classes/interfaces inherited from class com.vaadin.server.SynchronizedRequestHandler
SynchronizedRequestHandler.ResponseWriter
-
-
Field Summary
Fields Modifier and Type Field Description static String
IGNORE_RESTART_PARAM
Deprecated.
Parameter that is added to the UI init request if the session has already been restarted when generating the bootstrap HTML and ?restartApplication should thus be ignored when handling the UI init request.
-
Fields inherited from class com.vaadin.server.SynchronizedRequestHandler
MAX_BUFFER_SIZE
-
-
Constructor Summary
Constructors Constructor Description BootstrapHandler()
Deprecated.
-
Method Summary
All Methods Modifier and Type Method Description protected void
appendMainScriptTagContents(BootstrapHandler.BootstrapContext context, StringBuilder builder)
Deprecated.
protected boolean
canHandleRequest(VaadinRequest request)
Deprecated.
Check whether a request may be handled by this handler.
String
findAndEscapeThemeName(BootstrapHandler.BootstrapContext context)
Deprecated.
Do not override.
protected elemental.json.JsonObject
getApplicationParameters(BootstrapHandler.BootstrapContext context)
Deprecated.
protected abstract String
getContextRootPath(BootstrapHandler.BootstrapContext context)
Deprecated.
protected String
getMainDivStyle(BootstrapHandler.BootstrapContext context)
Deprecated.
protected abstract String
getServiceUrl(BootstrapHandler.BootstrapContext context)
Deprecated.
String
getThemeName(BootstrapHandler.BootstrapContext context)
Deprecated.
Override if required.
String
getThemeUri(BootstrapHandler.BootstrapContext context, String themeName)
Deprecated.
Get the URI for the application theme.
WidgetsetInfo
getWidgetsetForUI(BootstrapHandler.BootstrapContext context)
Deprecated.
static String
resolveFrontendUrl(VaadinSession session)
Deprecated.
Resolves the URL to use for the frontend:// protocol.
boolean
synchronizedHandleRequest(VaadinSession session, VaadinRequest request, VaadinResponse response)
Deprecated.
Identical to
SynchronizedRequestHandler.handleRequest(VaadinSession, VaadinRequest, VaadinResponse)
except theVaadinSession
is locked before this is called and unlocked after this has completed.protected void
writeError(VaadinResponse response, Throwable e)
Deprecated.
-
Methods inherited from class com.vaadin.server.SynchronizedRequestHandler
getRequestBody, handleRequest, isReadAndWriteOutsideSessionLock, synchronizedHandleRequest
-
-
-
-
Field Detail
-
IGNORE_RESTART_PARAM
public static final String IGNORE_RESTART_PARAM
Deprecated.Parameter that is added to the UI init request if the session has already been restarted when generating the bootstrap HTML and ?restartApplication should thus be ignored when handling the UI init request.
See Also:
-
-
Method Detail
-
resolveFrontendUrl
public static String resolveFrontendUrl(VaadinSession session)
Deprecated.Resolves the URL to use for the frontend:// protocol.
Parameters:
session
- the session of the user to resolve the protocol forReturns:
the URL that frontend:// resolves to, possibly using another internal protocol
Since:
8.1
-
canHandleRequest
protected boolean canHandleRequest(VaadinRequest request)
Deprecated.Description copied from class:
SynchronizedRequestHandler
Check whether a request may be handled by this handler. This can be used as an optimization to avoid locking the session just to investigate some method property. The default implementation just returns
true
which means that all requests will be handled by callingSynchronizedRequestHandler.synchronizedHandleRequest(VaadinSession, VaadinRequest, VaadinResponse)
with the session locked.Overrides:
canHandleRequest
in classSynchronizedRequestHandler
Parameters:
request
- the request to handleReturns:
true
if the request handling should continue once the session has been locked;false
if there's no need to lock the session since the request would still not be handled.
-
synchronizedHandleRequest
public boolean synchronizedHandleRequest(VaadinSession session, VaadinRequest request, VaadinResponse response) throws IOException
Deprecated.Description copied from class:
SynchronizedRequestHandler
Identical to
SynchronizedRequestHandler.handleRequest(VaadinSession, VaadinRequest, VaadinResponse)
except theVaadinSession
is locked before this is called and unlocked after this has completed.Specified by:
synchronizedHandleRequest
in classSynchronizedRequestHandler
Parameters:
session
- The session for the requestrequest
- The request to handleresponse
- The response object to which a response can be written.Returns:
true if a response has been written and no further request handlers should be called, otherwise false
Throws:
IOException
- If an IO error occurredSee Also:
SynchronizedRequestHandler.handleRequest(VaadinSession, VaadinRequest, VaadinResponse)
-
getMainDivStyle
protected String getMainDivStyle(BootstrapHandler.BootstrapContext context)
Deprecated.
-
getWidgetsetForUI
public WidgetsetInfo getWidgetsetForUI(BootstrapHandler.BootstrapContext context)
Deprecated.
-
appendMainScriptTagContents
protected void appendMainScriptTagContents(BootstrapHandler.BootstrapContext context, StringBuilder builder) throws IOException
Deprecated.Throws:
-
getApplicationParameters
protected elemental.json.JsonObject getApplicationParameters(BootstrapHandler.BootstrapContext context)
Deprecated.
-
getContextRootPath
protected abstract String getContextRootPath(BootstrapHandler.BootstrapContext context)
Deprecated.Since:
8.0.3
-
getServiceUrl
protected abstract String getServiceUrl(BootstrapHandler.BootstrapContext context)
Deprecated.
-
getThemeUri
public String getThemeUri(BootstrapHandler.BootstrapContext context, String themeName)
Deprecated.Get the URI for the application theme. A portal-wide default theme is fetched from the portal shared resource directory (if any), other themes from the portlet.
Parameters:
context
-themeName
-Returns:
-
getThemeName
public String getThemeName(BootstrapHandler.BootstrapContext context)
Deprecated.Override if required.
Parameters:
context
-Returns:
-
findAndEscapeThemeName
public String findAndEscapeThemeName(BootstrapHandler.BootstrapContext context)
Deprecated.Do not override.
Parameters:
context
-Returns:
-
writeError
protected void writeError(VaadinResponse response, Throwable e) throws IOException
Deprecated.Throws:
-
-