Java客户端订阅cometd频道 [英] java client to subscribe to cometd channels

查看:289
本文介绍了Java客户端订阅cometd频道的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们将充当客户端的应用程序需要订阅一个外部系统,该系统使用Cometd向客户端传递未经请求的通知。有没有没有Cometd库的方法(例如通过apache HttpClient)吗? Java版本不匹配是一个问题-我们使用1.6,但cometd需要1.7或更高。

Our application that will act as a client needs to subscribe to an external system that uses cometd to deliver unsolicited notifications to clients. Is there a way to achieve this without cometd libraries (via apache HttpClient for instance)? Java version mismatch is the problem - we use 1.6, but cometd require 1.7 or higher.

预先感谢

推荐答案

CometD 2.x(尽管不再开发中)支持JDK 5。

CometD 2.x, albeit not under development anymore, supports back to JDK 5.

底层协议( Bayeux )是相同的,因此我希望CometD 2.x客户端可以与CometD 3兼容.x服务器。

The underlying protocol (Bayeux) is the same, so I expect a CometD 2.x client to work against a CometD 3.x server.

另一种方法是让您从头重新实现Bayeux协议,这并不困难,但确实需要一些工作。

The alternative is for you to reimplement the Bayeux protocol from scratch, which is not that difficult but it does require a bit of work.

这篇关于Java客户端订阅cometd频道的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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