Class XhrConnection.XhrResponseHandler

java.lang.Object
com.vaadin.client.communication.XhrConnection.XhrResponseHandler
All Implemented Interfaces:
Xhr.Callback
Enclosing class:
XhrConnection

public class XhrConnection.XhrResponseHandler extends Object implements Xhr.Callback
Handles the response from the server by forwarding the received message to MessageHandler or failures to the appropriate method in ConnectionStateHandler.
  • Constructor Details

    • XhrResponseHandler

      public XhrResponseHandler()
  • Method Details

    • setPayload

      public void setPayload(elemental.json.JsonObject payload)
      Sets the payload which was sent to the server.
      Parameters:
      payload - the payload which was sent to the server
    • onFail

      public void onFail(com.google.gwt.xhr.client.XMLHttpRequest xhr, Exception e)
      Description copied from interface: Xhr.Callback
      Called when the request fails.
      Specified by:
      onFail in interface Xhr.Callback
      Parameters:
      xhr - the request object
      e - the exception which cause the request to fail, or null if not available
    • onSuccess

      public void onSuccess(com.google.gwt.xhr.client.XMLHttpRequest xhr)
      Description copied from interface: Xhr.Callback
      Called when the request succeeds.
      Specified by:
      onSuccess in interface Xhr.Callback
      Parameters:
      xhr - the request object