|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exoplatform.gwtframework.commons.rest.AsyncRequestCallback<T>
public abstract class AsyncRequestCallback<T>
Created by The eXo Platform SAS .
| Constructor Summary | |
|---|---|
AsyncRequestCallback()
|
|
AsyncRequestCallback(Unmarshallable<T> unmarshaller)
Constructor retrieves unmarshaller with initialized (this is important!) object. |
|
| Method Summary | |
|---|---|
T |
getPayload()
|
AsyncRequest |
getRequest()
|
protected boolean |
isSuccessful(com.google.gwt.http.client.Response response)
|
void |
onError(com.google.gwt.http.client.Request request,
java.lang.Throwable exception)
|
protected abstract void |
onFailure(java.lang.Throwable exception)
If error received from server. |
void |
onResponseReceived(com.google.gwt.http.client.Request request,
com.google.gwt.http.client.Response response)
|
protected void |
onServerDisconnected()
If server disconnected. |
protected abstract void |
onSuccess(T result)
If response is successfully received and response status code is in set of success codes. |
protected void |
onUnauthorized(com.google.gwt.http.client.Response response)
If unauthorized. |
void |
setLoader(AsyncRequestLoader loader)
|
void |
setRequest(AsyncRequest request)
|
void |
setSuccessCodes(int[] successCodes)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AsyncRequestCallback()
obj - loader - public AsyncRequestCallback(Unmarshallable<T> unmarshaller)
unmarshaller - loader - | Method Detail |
|---|
public T getPayload()
public void setSuccessCodes(int[] successCodes)
successCodes - the successCodes to setpublic final void setLoader(AsyncRequestLoader loader)
public final void onError(com.google.gwt.http.client.Request request,
java.lang.Throwable exception)
onError in interface com.google.gwt.http.client.RequestCallbackRequestCallback.onError(com.google.gwt.http.client.Request, java.lang.Throwable)
public final void onResponseReceived(com.google.gwt.http.client.Request request,
com.google.gwt.http.client.Response response)
onResponseReceived in interface com.google.gwt.http.client.RequestCallbackRequestCallback.onResponseReceived(com.google.gwt.http.client.Request, com.google.gwt.http.client.Response)protected final boolean isSuccessful(com.google.gwt.http.client.Response response)
protected abstract void onSuccess(T result)
request - response - protected abstract void onFailure(java.lang.Throwable exception)
exception - caused failureprotected void onServerDisconnected()
protected void onUnauthorized(com.google.gwt.http.client.Response response)
response - public void setRequest(AsyncRequest request)
public AsyncRequest getRequest()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||