|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public DeferredOperation
In addition to the Deferred interface, which allows to trigger callbacks after the entire action has finished, the DeferredOperation interface allows to trigger a callback for each involved operation.
| Field Summary | |
|---|---|
String |
OPERATION_GET
Mode of operation: retrieving a resource |
String |
OPERATION_CREATE
Mode of operation: creating a resource |
String |
OPERATION_MODIFY
Mode of operation: modifying a resource |
String |
OPERATION_DELETE
Mode of operation: deleting a resource |
| Method Summary | |
|---|---|
Deferred |
setFinishedCallback(Object callback,
Object parameter,
Boolean verbose)
Sets the handler of the deferred action. |
Deferred |
setOperationCallback(Object callback,
Object parameter,
Boolean verbose)
Sets the operation handler of the deferred action. |
| Methods inherited from interface com.ibm.mashups.enabler.Deferred |
|---|
setFinishedCallback, start |
| Field Detail |
|---|
String OPERATION_GET
String OPERATION_CREATE
String OPERATION_MODIFY
String OPERATION_DELETE
| Method Detail |
|---|
Deferred setFinishedCallback(Object callback,
Object parameter,
Boolean verbose)
callback -
the callback function in either one of the following flavors: function(Object verboseFinishResult), where:verboseFinishResult =
{
resource: resource object or id string of the related resource,statusCode: overall HTTP status code,parameter: the parameter passed into setFinishedCallback,operations: array of verboseOperationResult, see setOperationCallback} function(Object resource, int statusCode, Object parameter), where: resource - resource object or id string of the related resource,statusCode - overall HTTP status code,parameter - the parameter passed into setFinishedCallbackparameter -
optional parameter to be passed on to the callback function; may be nullverbose -
flag to indicate if the callback function is invoked in verbose or non-verbose mode; optional, defaults to false
Deferred setOperationCallback(Object callback,
Object parameter,
Boolean verbose)
callback -
the callback function in either one of the following flavors: function(Object verboseOperationResult), whereverboseOperationResult =
{
resource: resource object or id string of the related resource,parameter: the parameter passed into setOperationCallback,mode: OPERATION_GET | OPERATION_CREATE | OPERATION_MODIFIY | OPERATION_DELETE,request:
{
statusCode: HTTP status code,responseText: server response text}} function(Object resource, String mode, int statusCode, Object parameter), where resource: resource object or id string of the related resource,mode: OPERATION_GET | OPERATION_CREATE | OPERATION_MODIFIY | OPERATION_DELETE,statusCode: HTTP status code,parameter: the parameter passed into setOperationCallbackparameter -
optional parameter to be passed on to the callback function; may be nullverbose -
flag to indicate if the callback function is invoked in verbose or non-verbose mode; optional, defaults to false
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||