views:

36

answers:

1

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

Is there some plugins in the Openfire can do this?

A: 

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();
Chuk Lee
Nightly builds are now available at http://www.igniterealtime.org/downloads/nightly_smack.jsp
Robin