This function will add the client page to a push group, and register the provided callback listener with the ICEpush bridge. The callback listener will be called when a push notification occurs for the specified group.
Here the client registers itself with an ICEpush group called 'time', and provides an anonymous callback listener function. The group 'time' does not have to be previously declared on the server or client, and will be created by the ICEpush bridge when this registration occurs. When any notifications for the group 'time' occur, the ICEpush bridge will call this function, and the function will create a Prototype Ajax.Updater object to update the 'timeElem' element. These push events can be triggered on the client through a call to ice.push.notify(groupName); or from the server-side with the Java API.
This function will remove the client page from a joined group, unregistering the client from a previously registered group.
Here clicking the button will remove the client page from the 'time' group, removing all callbacks registered for that group.
If we had multiple different callback functions registered to the time group we could selectively remove individual functions this way:
The function will register the client page with an ICEPush group, and automatically call the provided url when an ICEpush event occurs for the registered group. When a push event occurs, a HTTP GET request will be made for the provided url, and the HTML response will be loaded into all selected elements from the prototype selector.
This code starts with the prototype selector $$('div.groups') which selects the two divs above the script. The .loadPushUpdates('groups','./groups'); registers the client page with the ICEpush group 'groups'. When an ICEpush notification occurs for the group 'groups', the url './groups' will be called with an HTTP GET request, and the resulting response will be placed inside both selected div elements.
The class will register the client page with an ICEPush group, and automatically call the provided url when an ICEpush event occurs for the registered group. When a push event occurs, a prototype Ajax.Updater will be created with the container, url and options.
This code will register the page with the push group named 'groups'. When a push notification event occurs for the group 'groups', a Prototype Ajax.Updater class will be created that calls the url './groups', with an HTTP GET request and places the response into the HTML element with the id 'groupsElem'.
© Copyright 2017 ICEsoft Technologies Canada Corp.