The suggested method for calling native javascript from GWT is to declare methods as 'native' and then write javascript code in the method body. The first step of the integration is to wrap each of the push javascript api calls into GWT native calls. Specifically the following methods will be wrapped:
ice.push.createPushId()
ice.push.addGroupMember()
ice.push.removeGroupMember()
ice.push.register() [this method will take different paramters - push id and a GWT pushEventListener]
I decided not to wrap the ice.push.notify() method until the security issues had been sorted out.
The high level GWt integration methods GWTPushContext.addPushListener() and GWTPushContext.removePushListener() will be compositions of the previously mentioned native calls.
It was decided early in the design cycle that the ICEpush integration for GWT should be an wrapping of the ICEpush Javascript API. However, the exposed GWT push API must look more like Java style operations rather than Javascript ones. In this spirit, a GWT application will be able to register Java Listeners to push groups. I expect the have an interface called PushEventListener that will provide a single callback method onPushEvent(). The implementing class can then provide the application logic that should be executed when a push event is received.