服务器到客户端的推送通知? [英] server to client push notification?

查看:201
本文介绍了服务器到客户端的推送通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为我的应用程序的特定功能的解决方案,特点是同栈的新成就类别overflow.When特定事件发生的服务器(可能是某种程度的成就或某种条件满足),那么我想通过我的应用程序的GUI通知用户,什么是做这个特异性使用情况下,最好的办法.thanks在adnvance

I need a solution for a specific feature of my application ,feature is same as recent achievements category of stack overflow.When a specific event happen in server (may be some level achievement or some kind of condition satisfy)then i want to notify to user through the GUI of my application ,What is the best approach to do this specif use case .thanks in adnvance

推荐答案

您会要么需要使用的WebSockets 或客户方投票。

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

有几个Java库都来帮你提取从底层机制,可以回退到轮询的WebSockets,如果没有浏览器支持:

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. 气氛

  3. DWR的反向AJAX

  4. Spring MVC的

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

我肯定还有更多但会得到您开始:)

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

这篇关于服务器到客户端的推送通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆