Package com.vaadin.client.communication
Class XhrConnection.XhrResponseHandler
java.lang.Object
com.vaadin.client.communication.XhrConnection.XhrResponseHandler
- All Implemented Interfaces:
Xhr.Callback
- Enclosing class:
- XhrConnection
Handles the response from the server by forwarding the received message
to
MessageHandler or failures to the appropriate method in
ConnectionStateHandler.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled when the request fails.voidonSuccess(com.google.gwt.xhr.client.XMLHttpRequest xhr) Called when the request succeeds.voidsetPayload(elemental.json.JsonObject payload) Sets the payload which was sent to the server.
-
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
Description copied from interface:Xhr.CallbackCalled when the request fails.- Specified by:
onFailin interfaceXhr.Callback- Parameters:
xhr- the request objecte- 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.CallbackCalled when the request succeeds.- Specified by:
onSuccessin interfaceXhr.Callback- Parameters:
xhr- the request object
-