Push API

Table of Contents

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)

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:

var connectionLostHandler = function(reconnectionAttempts) {
...
};
ice.onBlockingConnectionLost(connectionLostHandler);

Parameters:

  • reconnectionAttempts

    The number of reconnect attempts made by the bridge to re-establish the connection before considering the connection unrecoverable.


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:

var serverErrorHandler = function(statusCode, responseText, responseDOM) {
...
};
ice.onBlockingConnectionServerError(serverErrorHandler);

Parameters:

  • statusCode

    The HTTP status code.

  • responseText

    The body of the HTTP response in text format.

  • responseDOM

    The parsed body of the HTTP response as XML. This parameter is present only when response is in XML/HTML format.


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:

var connectionUnstableHandler = function() {
...
};
ice.onBlockingConnectionUnstable(connectionUnstableHandler);

Parameters:

  • none

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:

var connectionReEstablishedHandler = function() {
...
};
ice.onBlockingConnectionUnstable(connectionReEstablishedHandler);

Parameters:

  • none

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:

var connectionReceiveHandler = function() {
...
};
ice.onBlockingConnectionReceive(connectionReceiveHandler);

Parameters:

  • message

    The received message.


Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

© Copyright 2021 ICEsoft Technologies Canada Corp.