public class BootstrapHandler extends SynchronizedRequestHandler
Modifier and Type | Class and Description |
---|---|
protected static class |
BootstrapHandler.BootstrapContext
Provides context information for the bootstrap process.
|
static class |
BootstrapHandler.BootstrapUriResolver
The URI resolver used in the bootstrap process.
|
Constructor and Description |
---|
BootstrapHandler() |
Modifier and Type | Method and Description |
---|---|
protected BootstrapHandler.BootstrapContext |
createAndInitUI(Class<? extends UI> uiClass,
VaadinRequest request,
VaadinResponse response,
VaadinSession session) |
protected static elemental.json.JsonObject |
getApplicationParameters(BootstrapHandler.BootstrapContext context) |
protected static elemental.json.JsonObject |
getInitialUidl(UI ui)
Generates the initial UIDL message which is included in the initial
bootstrap page.
|
protected static String |
getServiceUrl(BootstrapHandler.BootstrapContext context)
Gets the service URL as a URL relative to the request URI.
|
protected static Class<? extends UI> |
getUIClass(VaadinRequest request)
Returns the UI class mapped for servlet that handles the given request.
|
protected static String |
readResource(String fileName) |
protected static Optional<String> |
resolvePageTitle(BootstrapHandler.BootstrapContext context)
Resolves the initial page title for the given bootstrap context and
cancels any pending JS execution for it.
|
protected void |
setupPushConnectionFactory(PushConfiguration pushConfiguration,
BootstrapHandler.BootstrapContext context) |
boolean |
synchronizedHandleRequest(VaadinSession session,
VaadinRequest request,
VaadinResponse response)
Identical to
SynchronizedRequestHandler.handleRequest(VaadinSession, VaadinRequest, VaadinResponse)
except the VaadinSession is locked before this is called and
unlocked after this has completed. |
canHandleRequest, handleRequest
public boolean synchronizedHandleRequest(VaadinSession session, VaadinRequest request, VaadinResponse response) throws IOException
SynchronizedRequestHandler
SynchronizedRequestHandler.handleRequest(VaadinSession, VaadinRequest, VaadinResponse)
except the VaadinSession
is locked before this is called and
unlocked after this has completed.synchronizedHandleRequest
in class SynchronizedRequestHandler
session
- The session for the requestrequest
- The request to handleresponse
- The response object to which a response can be written.IOException
- If an IO error occurredSynchronizedRequestHandler.handleRequest(VaadinSession, VaadinRequest, VaadinResponse)
protected static elemental.json.JsonObject getApplicationParameters(BootstrapHandler.BootstrapContext context)
protected static String getServiceUrl(BootstrapHandler.BootstrapContext context)
context
- the bootstrap contextprotected static Optional<String> resolvePageTitle(BootstrapHandler.BootstrapContext context)
context
- the bootstrap contextprotected BootstrapHandler.BootstrapContext createAndInitUI(Class<? extends UI> uiClass, VaadinRequest request, VaadinResponse response, VaadinSession session)
protected void setupPushConnectionFactory(PushConfiguration pushConfiguration, BootstrapHandler.BootstrapContext context)
protected static elemental.json.JsonObject getInitialUidl(UI ui)
ui
- the UI for which the UIDL should be generatedprotected static Class<? extends UI> getUIClass(VaadinRequest request)
This method is protected for testing purposes.
request
- the request for the UICopyright © 2019. All rights reserved.