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.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.
|
protected void |
closeJsonMessage(Writer outWriter) |
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.
|
protected void |
openJsonMessage(Writer outWriter,
VaadinResponse response)
Writes the opening of JSON message to be sent to client.
|
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
handleRequest
public static final String UIDL_PATH
protected ServerRpcHandler createRpcHandler()
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 void closeJsonMessage(Writer outWriter) throws IOException
IOException
protected void openJsonMessage(Writer outWriter, VaadinResponse response) throws IOException
outWriter
- response
- IOException
public boolean handleSessionExpired(VaadinRequest request, VaadinResponse response) throws IOException
SessionExpiredHandler
true
to indicate that no more
SessionExpiredHandler
handlers should be invoked for the request.handleSessionExpired
in interface SessionExpiredHandler
request
- The request to handleresponse
- The response object to which a response can be written.IOException
- If an IO error occurredCopyright © 2018 Vaadin Ltd. All rights reserved.