Class ServerRpcHandler.RpcRequest

java.lang.Object
com.vaadin.flow.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:
1.0
Author:
Vaadin Ltd
See Also:
  • Constructor Details

    • RpcRequest

      public RpcRequest(String jsonString, VaadinRequest request)
      Creates an instance based on the given JSON received through the given request.
      Parameters:
      jsonString - the JSON containing the RPC invocations
      request - the request through which the JSON was received
  • Method Details

    • getCsrfToken

      public String getCsrfToken()
      Gets the CSRF security token (synchronizer token pattern) 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
    • 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