public class UidlRequestHandler extends SynchronizedRequestHandler implements SessionExpiredHandler
ServerRpcHandler to execute client-to-server RPC invocations and
UidlWriter to write state changes and client RPC calls back to the
client.
For internal use only. May be renamed or removed in a future release.
SynchronizedRequestHandler.ResponseWriterMAX_BUFFER_SIZE| Constructor and Description |
|---|
UidlRequestHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canHandleRequest(VaadinRequest request)
Check whether a request may be handled by this handler.
|
static void |
commitJsonResponse(VaadinResponse response,
String json)
Commit the JSON response.
|
protected ServerRpcHandler |
createRpcHandler()
Creates the ServerRpcHandler to use.
|
boolean |
handleSessionExpired(VaadinRequest request,
VaadinResponse response)
Called when the a session expiration has occurred and a notification
needs to be sent to the user.
|
boolean |
isReadAndWriteOutsideSessionLock()
Gets if request body should be read and the response written without
holding
VaadinSession lock |
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. |
Optional<SynchronizedRequestHandler.ResponseWriter> |
synchronizedHandleRequest(VaadinSession session,
VaadinRequest request,
VaadinResponse response,
String requestBody)
Identical to
SynchronizedRequestHandler.synchronizedHandleRequest(VaadinSession, VaadinRequest, VaadinResponse)
except the VaadinSession is locked before this is called and the
response requestBody has been read before locking the session and is
provided as a separate parameter. |
getRequestBody, handleRequestclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithandleRequestprotected boolean canHandleRequest(VaadinRequest request)
SynchronizedRequestHandlertrue which means that all requests will be handled by
calling
SynchronizedRequestHandler.synchronizedHandleRequest(VaadinSession, VaadinRequest, VaadinResponse)
with the session locked.canHandleRequest in class SynchronizedRequestHandlerrequest - 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.protected ServerRpcHandler createRpcHandler()
public boolean synchronizedHandleRequest(VaadinSession session, VaadinRequest request, VaadinResponse response) throws IOException
SynchronizedRequestHandlerSynchronizedRequestHandler.handleRequest(VaadinSession, VaadinRequest, VaadinResponse)
except the VaadinSession is locked before this is called and
unlocked after this has completed.synchronizedHandleRequest in class SynchronizedRequestHandlersession - 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)public boolean isReadAndWriteOutsideSessionLock()
SynchronizedRequestHandlerVaadinSession lockisReadAndWriteOutsideSessionLock in class SynchronizedRequestHandlerSynchronizedRequestHandler.synchronizedHandleRequest(VaadinSession, VaadinRequest, VaadinResponse, String)
should be called. Returns false if
SynchronizedRequestHandler.synchronizedHandleRequest(VaadinSession, VaadinRequest, VaadinResponse)
should be called.public Optional<SynchronizedRequestHandler.ResponseWriter> synchronizedHandleRequest(VaadinSession session, VaadinRequest request, VaadinResponse response, String requestBody) throws IOException, UnsupportedOperationException
SynchronizedRequestHandlerSynchronizedRequestHandler.synchronizedHandleRequest(VaadinSession, VaadinRequest, VaadinResponse)
except the VaadinSession is locked before this is called and the
response requestBody has been read before locking the session and is
provided as a separate parameter.synchronizedHandleRequest in class SynchronizedRequestHandlersession - The session for the requestrequest - The request to handleresponse - The response object to which a response can be written.requestBody - Request body pre-read from the request objectIOException - If an IO error occurredUnsupportedOperationExceptionSynchronizedRequestHandler.handleRequest(VaadinSession, VaadinRequest, VaadinResponse)public boolean handleSessionExpired(VaadinRequest request, VaadinResponse response) throws IOException
SessionExpiredHandlertrue to indicate that no more
SessionExpiredHandler handlers should be invoked for the request.handleSessionExpired in interface SessionExpiredHandlerrequest - The request to handleresponse - The response object to which a response can be written.IOException - If an IO error occurredpublic static void commitJsonResponse(VaadinResponse response, String json) throws IOException
response - The response to write tojson - The JSON to writeIOException - If there was an exception while writing to the outputCopyright © 2025. All rights reserved.