Interface SuccessCallback


public interface SuccessCallback

This interface represents a function prototype for a successful server operation.

Server calls are made asynchronously and a callback is made when the response is received. The default callbacks are Script.onSuccess(Object, Value) and Script.onFailure(Object, String).

If success callback is not specified in the server call the default callback Script.onSuccess(Object, Value) is called. If a function matching the signature of onSuccess(Object, Value) is given it will be called instead.

See Also:
Callbacks, call(Object, String, String, Value, SuccessCallback, FailureCallback)

Method Summary
 void onSuccess(Object state, Value returnValue)
          Called when a server operation has finished successfully.
 

Method Detail

onSuccess

void onSuccess(Object state,
               Value returnValue)
Called when a server operation has finished successfully.

Parameters:
state - State object given with call(Object, String, String, Value)
returnValue - the return value from server