public class ServerRpcHandler extends Object implements Serializable
For internal use only. May be renamed or removed in a future release.
| Modifier and Type | Class and Description |
|---|---|
static class |
ServerRpcHandler.InvalidUIDLSecurityKeyException
Exception thrown then the security key sent by the client does not match
the expected one.
|
static class |
ServerRpcHandler.ResynchronizationRequiredException
Exception thrown then the client side resynchronization is required.
|
static class |
ServerRpcHandler.RpcRequest
A data transfer object representing an RPC request sent by the client
side.
|
| Constructor and Description |
|---|
ServerRpcHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected Map<String,RpcInvocationHandler> |
getInvocationHandlers()
Gets
RpcInvocationHandlers map where the key is the type of the
handler gotten via RpcInvocationHandler.getRpcType(). |
protected String |
getMessage(Reader reader) |
protected String |
getMessage(Reader reader,
VaadinRequest request)
Reads the RPC message from the given reader, enforcing the maximum
request body size configured for the given request.
|
void |
handleRpc(UI ui,
Reader reader,
VaadinRequest request)
Reads JSON containing zero or more serialized RPC calls (including legacy
variable changes) and executes the calls.
|
void |
handleRpc(UI ui,
String message,
VaadinRequest request)
Reads JSON containing zero or more serialized RPC calls (including legacy
variable changes) and executes the calls.
|
public void handleRpc(UI ui, Reader reader, VaadinRequest request) throws IOException, ServerRpcHandler.InvalidUIDLSecurityKeyException
ui - The UI receiving the calls. Cannot be null.reader - The Reader used to read the JSON.request - The request through which the RPC was receivedIOException - If reading the message fails.ServerRpcHandler.InvalidUIDLSecurityKeyException - If the received security key does not match the one stored in
the session.public void handleRpc(UI ui, String message, VaadinRequest request) throws ServerRpcHandler.InvalidUIDLSecurityKeyException
ui - The UI receiving the calls. Cannot be null.message - The JSON message from the request.request - The request through which the RPC was receivedServerRpcHandler.InvalidUIDLSecurityKeyException - If the received security key does not match the one stored in
the session.protected Map<String,RpcInvocationHandler> getInvocationHandlers()
RpcInvocationHandlers map where the key is the type of the
handler gotten via RpcInvocationHandler.getRpcType().
This map is used to delegate RPC requests to a specific invocation handler using the type of the request.
Subclasses can overwrite this method to return custom invocation handlers.
protected String getMessage(Reader reader) throws IOException
IOExceptionprotected String getMessage(Reader reader, VaadinRequest request) throws IOException
reader - the reader to read the message fromrequest - the request the message was received throughIOException - if reading failsRequestBodyTooLargeException - if the message exceeds the configured maximum sizeCopyright © 2000–2026 Vaadin Ltd. All rights reserved.