public abstract class UIInitHandler extends SynchronizedRequestHandler
UI
.Modifier and Type | Field and Description |
---|---|
static String |
BROWSER_DETAILS_PARAMETER |
Constructor and Description |
---|
UIInitHandler() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canHandleRequest(VaadinRequest request)
Check whether a request may be handled by this handler.
|
protected String |
getEmbedId(VaadinRequest request)
Constructs an embed id based on information in the request.
|
protected String |
getInitialUidl(VaadinRequest request,
UI uI)
Generates the initial UIDL message that can e.g.
|
protected abstract boolean |
isInitRequest(VaadinRequest request) |
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. |
handleRequest
public static final String BROWSER_DETAILS_PARAMETER
protected abstract boolean isInitRequest(VaadinRequest request)
protected boolean canHandleRequest(VaadinRequest request)
SynchronizedRequestHandler
true
which means that all requests will be handled by
calling
SynchronizedRequestHandler.synchronizedHandleRequest(VaadinSession, VaadinRequest, VaadinResponse)
with the session locked.canHandleRequest
in class SynchronizedRequestHandler
request
- the request to handletrue
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.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 String getEmbedId(VaadinRequest request)
request
- the request to get embed information fromnull
if id is not available.UI.getEmbedId()
protected String getInitialUidl(VaadinRequest request, UI uI) throws IOException
request
- the request that caused the initializationuI
- the UI for which the UIDL should be generatedIOException
Copyright © 2022 Vaadin Ltd. All rights reserved.