How can I connect GWT to CometD/Bayeux events?

旧城冷巷雨未停 提交于 2019-12-23 17:07:00

问题


I've got a GWT application, which periodically needs to update the screen with new tick items as they come in. We also have messages published by a CometD/Bayeux server (for a different AJAX application) and I'd like to consume them in my GWT.

Of course, I can drop into JavaScript, hook up Dojo, and receive callbacks in the JavaScript layer - and from there, route a call into GWT Java code via a JSNI - but there doesn't appear to be any support in GWT directly for using long push or async calls other than the non-RESTful RPC.

How have you integrated GWT and Bayeux?


回答1:


Since this question was originally posted there have been a few advances:

  • http://code.google.com/p/google-web-toolkit-incubator/wiki/ServerPushFAQ
  • http://code.google.com/p/gwteventservice/
  • http://code.google.com/p/gwt-comet/



回答2:


JSNI is not that bad option as it might sound first. There is a DZone refcardz 'GWT: Style, Configuration and JSNI Reference' which I have found helpful.



来源:https://stackoverflow.com/questions/1899925/how-can-i-connect-gwt-to-cometd-bayeux-events

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!