Push API

Version 5 by Mircea Toma
on Mar 03, 2021 14:52.


compared with
Version 6 by Mircea Toma
on Mar 03, 2021 14:53.


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.blockingConnectionReEstablishedListeners(callback)|#blockingConnectionReEstablishedListeners]}}*
 * *{{[ice.onBlockingConnectionReceive(callback)|#onBlockingConnectionReceive]}}*
  
 ----
  
 \\
 {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
  
 h4. ice.onBlockingConnectionReEstablished(callback)
  
 Accepts a reference to a callback function. The callback function will be invoked when the client bridge's re-establishes the blocking connection. This could be caused by a transient network issue or when switching the blocking connection to a new window.
  
 _Usage:_
  
 {code:javascript}var connectionReEstablishedHandler = function() {
 ...
 };
 ice.onBlockingConnectionUnstable(connectionReEstablishedHandler);
 {code}
 {_}Parameters:_
  
 * none
  
 h4. ice.onBlockingConnectionReceive(callback)
  
 Accepts a reference to a callback function. The callback function will be invoked when the client bridge's messages from the server are received normally.
  
 _Usage:_
  
 {code:javascript}var connectionReceiveHandler = function() {
 ...
 };
 ice.onBlockingConnectionReceive(connectionReceiveHandler);
 {code}
 {_}Parameters:_
  
  * none
  * message
 bq. The received message.
  
  
 {panel}
 \\

© Copyright 2017 ICEsoft Technologies Canada Corp.