org.spiffyui.client.rest
Interface RESTObjectCallBack<T>

Type Parameters:
T - - The object type for the callback

public interface RESTObjectCallBack<T>

This interface is implemented by request callers to get the bean or Object back from a REST call.

RESTObjectCallBack is an optional interface. You can just implement RESTCallBack. The purpose of the RESTObjectCallBack object is to abstract away the knowledge of JSON, HTTP, or AJAX REST. A class calling the RESTObjectCallBack only has to deal with well formed Java objects in GWT and doesn't need to parse JSON or handle HTTP errors.

See Also:
RESTCallBack, RESTility

Method Summary
 void error(RESTException e)
          Called when the REST endpoint return successfully with an error message in the payload.
 void error(java.lang.String message)
          Called when there is an error
 void success(T o)
          Called when the REST call succeeds
 

Method Detail

success

void success(T o)
Called when the REST call succeeds

Parameters:
o - - The marshalled object from the REST call

error

void error(java.lang.String message)
Called when there is an error

Parameters:
message - the error message

error

void error(RESTException e)
Called when the REST endpoint return successfully with an error message in the payload.

Parameters:
e - the error