The Push API is available and valid only when ICEpush is enabled for the application.
The following Form APIs are available:
ice.onBlockingConnectionLost(callback)ice.onBlockingConnectionServerError(callback)ice.onBlockingConnectionUnstable(callback)ice.onBlockingConnectionReEstablished(callback)ice.onBlockingConnectionReceive(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
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
responseText
responseDOM
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:
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:
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