开发者

In Openfire, how can I get who have subscribed a node?

Some client subscribe a node, I want to know how to get the subscriber.

Is there some plugins in the Openfire can do this开发者_JS百科?


You will need to build the smack version from the repo to get PubSub support. See my blog for details. Once you have build smack, this is how you retrieve the list of subscribers

//Assume pubsub jid is pubsub.myserver
PubSubManager mgr = new PubSubManager(conn, "pubsub.myserver");

//Assume we are dealing with leafnode
LeafNode node = (LeafNode)mgr.getNode("mynode");

List<Subscriptions> subscriptions = node.getSubscriptions();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜