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
public class XhrConnection.XhrResponseHandler extends Object implements Xhr.Callback
Handles the response from the server by forwarding the received message toMessageHandleror failures to the appropriate method inConnectionStateHandler.
-
-
Constructor Summary
Constructors Constructor Description XhrResponseHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonFail(com.google.gwt.xhr.client.XMLHttpRequest xhr, Exception e)Called 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.
-
-
-
Method Detail
-
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.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
-
-