Push API

Version 3 by Ken Fyten
on Mar 07, 2016 16:27.


compared with
Current by Ken Fyten
on Mar 07, 2016 16:29.


 
Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 1 changes. View first change.

 h2. Push API
  
 The Push API is available and valid only when ICEpush is enabled for the application.
  
  
 The following Form APIs are available:
  
  * *[ice.onBlockingConnectionLost(callback)|#onBlockingConnectionLost]*
 * *[ice.onBlockingConnectionServerError(callback)|#onBlockingConnectionServerError]*
 * *[ice.onBlockingConnectionUnstable(callback)|#onBlockingConnectionUnstable]*
  * *{{[ice.onBlockingConnectionLost(callback)|#onBlockingConnectionLost]}}*
 * *{{[ice.onBlockingConnectionServerError(callback)|#onBlockingConnectionServerError]}}*
 * *{{[ice.onBlockingConnectionUnstable(callback)|#onBlockingConnectionUnstable]}}*
  
 ----
  
 \\
 {anchor:onBlockingConnectionLost}
 {panel}
 h4. ice.onBlockingConnectionLost(callback)
  
 Accepts a reference to a callback function. The callback function will be invoked when the blocking connection to the server has been lost and is considered unrecoverable.
  
 _Usage:_
  
 {code:javascript}var connectionLostHandler = function(reconnectionAttempts) {
 ...
 };
 ice.onBlockingConnectionLost(connectionLostHandler);
 {code}
 {_}Parameters:_
  
 * reconnectionAttempts
 bq. The number of reconnect attempts made by the bridge to re-establish the connection before considering the connection unrecoverable.
 {panel}
 \\
 {anchor:onBlockingConnectionServerError}
 {panel}
 h4. ice.onBlockingConnectionServerError(callback)
  
 Accepts a reference to a callback function. The callback function will be invoked when a server error is received by the browser on the blocking connection.
  
 _Usage:_
  
 {code:javascript}var serverErrorHandler = function(statusCode, responseText, responseDOM) {
 ...
 };
 ice.onBlockingConnectionServerError(serverErrorHandler);
 {code}
 {_}Parameters:_
  
 * statusCode
 bq. The HTTP status code.
  
 * responseText
 bq. The body of the HTTP response in text format.
  
 * responseDOM
 bq. The parsed body of the HTTP response as XML. This parameter is present only when response is in XML/HTML format.
 {panel}
 \\
 {anchor:onBlockingConnectionUnstable}
 {panel}
 h4. ice.onBlockingConnectionUnstable(callback)
  
 Accepts a reference to a callback function. The callback function will be invoked when the client bridge's hearbeat detects that the server isn't responding in a timely fashion.
  
 _Usage:_
  
 {code:javascript}var connectionUnstableHandler = function() {
 ...
 };
 ice.onBlockingConnectionUnstable(connectionUnstableHandler);
 {code}
 {_}Parameters:_
  
 * none
 {panel}
 \\

© Copyright 2018 ICEsoft Technologies Canada Corp.