Package com.google.gwt.http.client
Interface RequestCallback
-
public interface RequestCallbackThe primary interface a caller must implement to receive a response to aRequest.Required Module
Modules that use this interface should inheritcom.google.gwt.http.HTTP.<module> <!-- other inherited modules, such as com.google.gwt.user.User --> <inherits name="com.google.gwt.http.HTTP"/> <!-- additional module settings --> </module>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonError(Request request, java.lang.Throwable exception)Called when aRequestdoes not complete normally.voidonResponseReceived(Request request, Response response)Called when a pendingRequestcompletes normally.
-
-
-
Method Detail
-
onResponseReceived
void onResponseReceived(Request request, Response response)
Called when a pendingRequestcompletes 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 eventresponse- an instance of theResponseclass
-
onError
void onError(Request request, java.lang.Throwable exception)
Called when aRequestdoes not complete normally. ARequestTimeoutExceptionis 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 generatedexception- the error that was encountered
-
-