public class

RequestCallbackAdapter

extends Object
implements RequestCallback
java.lang.Object
   ↳ com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter<T>

Class Overview

Adapter from a RequestCallback interface to an AsyncCallback interface. For internal use only.

Summary

Nested Classes
enum RequestCallbackAdapter.ResponseReader Enumeration used to read specific return types out of a SerializationStreamReader
Public Constructors
RequestCallbackAdapter(SerializationStreamFactory streamFactory, String methodName, RpcStatsContext statsContext, AsyncCallback<T> callback, RequestCallbackAdapter.ResponseReader responseReader)
RequestCallbackAdapter(SerializationStreamFactory streamFactory, String methodName, RpcStatsContext statsContext, AsyncCallback<T> callback, RpcTokenExceptionHandler tokenExceptionHandler, RequestCallbackAdapter.ResponseReader responseReader)
Public Methods
void onError(Request request, Throwable exception)
Called when a Request does not complete normally.
void onResponseReceived(Request request, Response response)
Called when a pending Request completes normally.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.google.gwt.http.client.RequestCallback

Public Constructors

public RequestCallbackAdapter (SerializationStreamFactory streamFactory, String methodName, RpcStatsContext statsContext, AsyncCallback<T> callback, RequestCallbackAdapter.ResponseReader responseReader)

public RequestCallbackAdapter (SerializationStreamFactory streamFactory, String methodName, RpcStatsContext statsContext, AsyncCallback<T> callback, RpcTokenExceptionHandler tokenExceptionHandler, RequestCallbackAdapter.ResponseReader responseReader)

Public Methods

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