2

我需要针对我的应用程序的特定功能的解决方案,该功能与最近的堆栈溢出成就类别相同。当服务器中发生特定事件(可能是某种级别的成就或某种条件满足)时,我想通知用户通过我的应用程序的 GUI,执行此特定用例的最佳方法是什么。在此先感谢

4

1 回答 1

4

You'll either want to use WebSockets or clientside polling.

There's a few java libraries out there to help abstract you from the underlying mechanics which can fallback to polling if websockets are not supported by the browser:

  1. cometd
  2. atmosphere
  3. DWR's reverse-ajax
  4. spring mvc

Im sure there's more but that'll get you started :)

于 2015-10-13T09:27:47.497 回答