Package com.vaadin.server.communication
Class ServerRpcHandler.RpcRequest
- java.lang.Object
-
- com.vaadin.server.communication.ServerRpcHandler.RpcRequest
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- ServerRpcHandler
public static class ServerRpcHandler.RpcRequest extends Object implements Serializable
A data transfer object representing an RPC request sent by the client side.- Since:
- 7.2
- Author:
- Vaadin Ltd
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RpcRequest(String jsonString, VaadinRequest request)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetClientToServerId()Gets the id of the client to server message.StringgetCsrfToken()Gets the CSRF security token (double submit cookie) for this request.elemental.json.JsonObjectgetRawJson()Gets the entire request in JSON format, as it was received from the client.elemental.json.JsonArraygetRpcInvocationsData()Gets the data to recreate the RPC as requested by the client side.intgetSyncId()Gets the sync id last seen by the client.StringgetWidgetsetVersion()Gets the widget set version reported by the client.booleanisResynchronize()Checks if this is a request to resynchronize the client side.booleanisUnloadBeaconRequest()Check if request contains an unload request through Beacon API
-
-
-
Constructor Detail
-
RpcRequest
public RpcRequest(String jsonString, VaadinRequest request)
-
-
Method Detail
-
getCsrfToken
public String getCsrfToken()
Gets the CSRF security token (double submit cookie) for this request.- Returns:
- the CSRF security token for this current change request
-
getRpcInvocationsData
public elemental.json.JsonArray getRpcInvocationsData()
Gets the data to recreate the RPC as requested by the client side.- Returns:
- the data describing which RPC should be made, and all their data
-
getSyncId
public int getSyncId()
Gets the sync id last seen by the client.- Returns:
- the last sync id given by the server, according to the client's request
-
isResynchronize
public boolean isResynchronize()
Checks if this is a request to resynchronize the client side.- Returns:
- true if this is a resynchronization request, false otherwise
-
getClientToServerId
public int getClientToServerId()
Gets the id of the client to server message.- Returns:
- the server message id
- Since:
- 7.6
-
getRawJson
public elemental.json.JsonObject getRawJson()
Gets the entire request in JSON format, as it was received from the client.Note: This is a shared reference - any modifications made will be shared.
- Returns:
- the raw JSON object that was received from the client
-
isUnloadBeaconRequest
public boolean isUnloadBeaconRequest()
Check if request contains an unload request through Beacon API- Since:
- 8.23
-
getWidgetsetVersion
public String getWidgetsetVersion()
Gets the widget set version reported by the client.- Returns:
- The widget set version reported by the client or null if the message did not contain a widget set version
- Since:
- 7.6
-
-