public interface

RequestCallback

com.google.gwt.http.client.RequestCallback
Known Indirect Subclasses

Class Overview

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

Required Module

Modules that use this interface should inherit com.google.gwt.http.HTTP. {@gwt.include com/google/gwt/examples/http/InheritsExample.gwt.xml}

Summary

Public Methods
abstract void onError(Request request, Throwable exception)
Called when a Request does not complete normally.
abstract void onResponseReceived(Request request, Response response)
Called when a pending Request completes normally.

Public Methods

public abstract void onError (Request request, 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.

Parameters
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

public abstract 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.

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