com.ibm.mashups.enabler.io
Interface XHRMultipart


public XHRMultipart

Provides Dojo XHR support. Requests are batched together via a transaction concept - Dojo XHR requests which are made between the start and end transaction calls will be batched. This would include any Dojo API's which would use Dojo XHR. If the com.ibm.mashups.multipart.correlatehosts Configuration Service property is set to true, multipart requests will be split by hostname.


Method Summary
 void startTransaction()
           Begins a multipart transaction.
 DeferredOperation endTransactionDeferred()
           Ends a multipart transaction and submits the multipart request to the server.
 void endTransaction(Object callback, Object[] parameters)
          Deprecated.  Use endTransactionDeferred instead.
 void suspendTransaction()
           Suspends a mulitpart transaction, allowing normal XHR requests to be made.
 void resumeTransaction()
           Resumes a mulitpart transaction.
 Boolean isTransaction()
           Returns if there is an active multipart transaction
 

Method Detail

startTransaction

void startTransaction()
Begins a multipart transaction. If the com.ibm.mashups.multipart.enabled property is set to false, this method simply returns.


endTransactionDeferred

DeferredOperation endTransactionDeferred()
Ends a multipart transaction and submits the multipart request to the server. If the com.ibm.mashups.multipart.enabled property is set to false, this method simply returns.

Returns:
a deferred object used to start this operation. The return value when executed through the deferred object is null

endTransaction

void endTransaction(Object callback,
                    Object[] parameters)
Deprecated.  Use endTransactionDeferred instead.

Ends a multipart transaction and submits the multipart request to the server. If the com.ibm.mashups.multipart.enabled property is set to false, this method simply returns.

Parameters:
callback - the callback funtion in the format of Function(Object[] params). May be null
    Callbackparameters
    params - the parameters passed into the callback
parameters - optional array of parameters to be passed on to the callback function. May be null

suspendTransaction

void suspendTransaction()
Suspends a mulitpart transaction, allowing normal XHR requests to be made. If the com.ibm.mashups.multipart.enabled property is set to false, this method simply returns.


resumeTransaction

void resumeTransaction()
Resumes a mulitpart transaction. If the com.ibm.mashups.multipart.enabled property is set to false, this method simply returns.


isTransaction

Boolean isTransaction()
Returns if there is an active multipart transaction

Returns:
true if there is an active multipart transaction, false otherwise


Copyright IBM Corp. 2010 All Rights Reserved.