问题标签 [atmosphere]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
grails - Grails Atmosphere Plugin 广播到不同的客户端
我正在尝试扩展 Groovy Mag Atmosphere Example ( https://github.com/rbramley/GroovyMagJMS ) 以广播到不同的客户端。(就像在 Atmosphere 中向一部分订阅者广播一样)
客户端通过 url http://localhost:8080/GrailsTest/atmosphere/messages/?id=1连接。一个 id 将被传递给服务器。新添加的lookupBroadcaster 方法创建一个带有id 的新Broadcaster 对象。当我想广播消息时,客户端没有收到结果。
有人可以帮助我并尝试一下吗?
我将气氛 0.8.2 库添加到 BuildConfig.groovy 以使用像“/atmosphere/messages/*”这样的映射。
}
java - 为 Suspended Atmosphere 请求返回 JSONP
我有一个 servlet,它有一个挂起方法和一个广播方法:
我从浏览器调用它,并在我的浏览器中看到以下漂亮的输出:
所以我的对象很好地序列化为 JSONP。
现在我调用我的广播方法:
在服务器端,我得到以下异常并且没有广播:
我怎样才能让我的广播员工作?我需要返回JSONWithPadding
对象还是只返回 POJO?
java - 使用 Atmosphere 返回 JSONP 序列化对象
我想在我的一个项目中使用 Atmosphere 并且在使用它来返回简单的 POJO 序列化为 JSONP 时遇到一些问题。我不明白 @Produces 注释和com.sun.jersey.api.json.JSONWithPadding
我之前成功使用的必要对象之间的关系,以便在简单的 RESTful 服务中序列化我的 POJO-s。
这是我的暂停方法:
这会按预期向我返回适当的 JSON 字符串。问题来了。我有返回的广播方法:
这会产生以下异常:
框架似乎想要序列化 Notification 对象但无法这样做。JsonpFilter
似乎很闲。我不确定此方法是否应该返回 Notification 或JSONWithPadding
包装对象。如果我从@Broadcast 注释中删除过滤器,那么挂起方法会发出一个“com.ericsson.nss.entities.Notification@308be6”字符串。这比异常更好,但仍然不是 JSONP 消息。不幸的是,从 maven repo 构建的最新 rest-chat 演示没有运行(其他人提到的 /chat 上的 404)。
如果我的广播方法返回一个JSONWithPadding
实例并且过滤器关闭,则广播请求会获得有效的 JSONP 响应,但暂停的线程会再次返回 com.ericsson.nss.entities.Notification@7f84c9。
你能告诉我如何正确使用过滤器和注释吗?
(我使用的是最新的 0.9 版本的 Atmosphere)
java - How to destroy BroadCaster when browser connection is close in Atmosphere
I have created simple server push using atmosphere run time in tomcat 7.0.23 I am able to get message(data) from server in browser, now the problem is whenever i am closing the connection(browser), the servlet keeps broadcasting. I have referred the atmosphere white paper. It's mention that Auto‐detect client remote disconnection is supported in tomcat 7 by configuring the CometConnectionManagerValve Valve which i already did.
but nothing is happend.. Here is my onStateChange method.
I have also created AtmosphereResourceEventListener to keep track of various event. again its not invoking any method..
Please help. Thanks in advance.
java - 安卓氛围
首先,我计划在服务器端使用Atmosphere,在客户端使用带有 WebView 的 Android 应用程序,我将在其中使用 jQuery。
但是,稍后计划一个更“标准”的 Android 应用程序(没有 WebViews),我想知道 Atmosphere 是否也可以使用。
谢谢!
android - Android 的大气底层协议
是否可以将 Atmosphere 与 android 一起使用?(无 WebView)是否存在特定库(管理移动连接中的不可靠性)?我在哪里可以找到有关它的任何文档?
ajax - 在 Grails 中断开 Atmosphere 套接字
我正在编写一个使用 Atmosphere 插件的 Grails 应用程序。连接有效,但每次我在浏览器中更新页面时,我都会看到我的 Web 服务器添加了一个新的守护线程,该线程之后永远不会发布。
线程数达到 200 后,Web 服务器冻结。
似乎没有文档解释使用 Atmosphere 插件处理资源(断开连接)的正确方法是什么?
我的客户代码这样做:
我在服务器端使用大气处理程序;
处理程序的destroy
函数永远不会被调用!
下一张图片显示我有 23 个线程正在运行。当我启动我的应用程序时,其中大约有 6 个,每次按 F5 时都会添加它们!如果我禁用气氛,则不会添加新线程,因此此问题与气氛有关。(我在 Windows7 上使用 SpringSource 工具套件)。
如果解决方案不是微不足道的,我将不胜感激详细的分步说明或示例。
更新:在 Tomcat 中部署后,每 20 秒出现以下错误:
gwt - GWT 氛围 + RequestFactory
我想产生以下行为:
浏览器中的用户保存了一些实体。实体保存在服务器端后,它会生成通知,它必须通过 Atmosphere 通知所有其他客户端更新实体实例。
所以问题是我如何通过 Atmosphere 接口推送 POJO 实体?最后一个支持 Serializable 类型通过线路传输,而 RequestFactory 有另一种序列化机制。
所以我需要将 POJO 实体转换为 autobean,因为这是由 RF 完成并发送给客户端的。有人知道怎么做吗?
maven - maven 和大气 0.8.4
我的 pom.xml 中需要 Atmosphere 0.8.4
但我明白了
有人知道具有这种依赖关系的存储库吗?
jersey - 气氛和 REST 调用
我正在使用 Atmosphere 框架开发通知服务。我想知道是否有办法用 Apache CXF 框架替换 Jersey 组件。
谢谢您的帮助。