|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- - The object type for the callbackpublic 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.
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 unexpected error. |
void |
success(T o)
Called when your REST call succeeds. |
Method Detail |
---|
void success(T o)
Called when your REST call succeeds.
Success is defined as a call that contacted the server and the server returned a valid JSON response.
o
- The marshalled object from the REST callvoid error(java.lang.String message)
Called when there is an unexpected error.
These errors are results like network failures and other reasons the server can't be contacted. This method is also called when the server returns a result that isn't valid JSON data.
message
- The error message from the servervoid error(RESTException e)
Called when the REST endpoint return successfully with an error message in the payload.
This method is called when the server returned valid JSON in the format of a Spiffy UI RESTException
e
- the RESTException returned from the serverRESTException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |