GWT 2.7.0
Interface RequestCallback

public interface RequestCallback

The primary interface a caller must implement to receive a response to a Request.

Required Module

Modules that use this interface should inherit
  <!-- other inherited modules, such as -->
  <inherits name=""/>
  <!-- additional module settings -->

Method Summary
 void onError(Request request, java.lang.Throwable exception)
          Called when a Request does not complete normally.
 void onResponseReceived(Request request, Response response)
          Called when a pending Request completes normally.

Method Detail


void onResponseReceived(Request request,
                        Response response)
Called when a pending Request completes normally. Note this method is called even when the status code of the HTTP response is not "OK", 200.

request - the object that generated this event
response - an instance of the Response class


void onError(Request request,
             java.lang.Throwable exception)
Called when a Request does not complete normally. A RequestTimeoutException is one example of the type of error that a request may encounter.

request - the request object which has experienced the error condition, may be null if the request was never generated
exception - the error that was encountered

GWT 2.7.0