Class ZmRequestMgr
This class manages the sending of requests to the server, and handles the
responses, including refresh blocks and notifications.
Defined in: ZmRequestMgr.js.
Class Summary
Constructor Attributes |
Constructor Name and Description |
|
Creates a request manager.
|
Method Summary
Method Attributes |
Method Name and Description |
|
Cancels the request.
|
|
sendRequest(params, soapDoc, jsonObj, asyncMode, callback, errorCallback, continueCallback, offlineCallback, timeout, noBusyOverlay, accountName, response, skipAuthCheck, resend, sensitive, noSession, restUri, emptyResponseOkay, offlineRequest, useChangeToken)
Sends a request to the CSFE and processes the response.
|
Class Detail
ZmRequestMgr(controller)
Creates a request manager.
Author: Conrad Damon.
- Parameters:
-
{ZmController} controller
- the main controller
Method Detail
cancelRequest(reqId, errorCallback, noBusyOverlay)
Cancels the request.
- Parameters:
-
{String} reqId
- the request id
-
{AjxCallback} errorCallback
- the callback
-
{Boolean} noBusyOverlay
- if
true , do not show busy overlay
sendRequest(params, soapDoc, jsonObj, asyncMode, callback, errorCallback, continueCallback, offlineCallback, timeout, noBusyOverlay, accountName, response, skipAuthCheck, resend, sensitive, noSession, restUri, emptyResponseOkay, offlineRequest, useChangeToken)
Sends a request to the CSFE and processes the response. Notifications and
refresh blocks that come in the response header are handled. Also handles
exceptions by default, though the caller can pass in a special callback to
run for exceptions. The error callback should return true if it has
handled the exception, and false if standard exception handling should still
be performed.
- Parameters:
-
{Hash} params
- a hash of parameters
-
{AjxSoapDoc} soapDoc
- the SOAP document that represents the request
-
{Object} jsonObj
- the JSON object that represents the request (alternative to soapDoc)
-
{Boolean} asyncMode
- if
true , request will be made asynchronously
-
{AjxCallback} callback
- the next callback in chain for async request
-
{AjxCallback} errorCallback
- the callback to run if there is an exception
-
{AjxCallback} continueCallback
- the callback to run after user re-auths
-
{AjxCallback} offlineCallback
- the callback to run if the user is offline
-
{int} timeout
- the timeout value (in seconds)
-
{Boolean} noBusyOverlay
- if
true , don't use the busy overlay
-
{String} accountName
- the name of account to execute on behalf of
-
{Object} response
- the pre-determined response (no request will be made)
-
{Boolean} skipAuthCheck
- if
true , do not check if auth token has changed
-
{constant} resend
- the reason for resending request
-
{Boolean} sensitive
- if
true , attempt to use secure conn to protect data
-
{Boolean} noSession
- if
true , no session info is included
-
{String} restUri
- the REST URI to send the request to
-
{boolean} emptyResponseOkay
- if true, empty or no response from server is not an erro
-
{boolean} offlineRequest
- if true, request will not be send to server
-
{boolean} useChangeToken
- if true, request will try to use change token in header
|