org.fusesource.restygwt.client
Class AbstractRequestCallback<T>

java.lang.Object
  extended by org.fusesource.restygwt.client.AbstractRequestCallback<T>
All Implemented Interfaces:
RequestCallback

public abstract class AbstractRequestCallback<T>
extends Object
implements RequestCallback

Author:
Hiram Chirino

Field Summary
protected  MethodCallback<T> callback
           
protected  Method method
           
 
Constructor Summary
AbstractRequestCallback(Method method, MethodCallback<T> callback)
           
 
Method Summary
protected  boolean isFailedStatus(Response response)
           
 void onError(Request request, Throwable exception)
           
 void onResponseReceived(Request request, Response response)
           
protected abstract  T parseResult()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

method

protected final Method method

callback

protected MethodCallback<T> callback
Constructor Detail

AbstractRequestCallback

public AbstractRequestCallback(Method method,
                               MethodCallback<T> callback)
Method Detail

onError

public final void onError(Request request,
                          Throwable exception)
Specified by:
onError in interface RequestCallback

onResponseReceived

public final void onResponseReceived(Request request,
                                     Response response)
Specified by:
onResponseReceived in interface RequestCallback

isFailedStatus

protected boolean isFailedStatus(Response response)

parseResult

protected abstract T parseResult()
                          throws Exception
Throws:
Exception


Copyright © 2010-2011 FuseSource, Corp.. All Rights Reserved.