Domanda

i am writing a plugin for openfire. in this plugin i want to create node and subscribe clients to this node. i am successful in creating the nodes but i am unable to subscribe client to it. i am using this code to subscibe client but no use.

Node retreived = pubsub.getNode(nodeId); NodeSubscription subscription = new NodeSubscription(retreived, new JID("dinga@exalanche"), new JID("dinga@exalanche"), State.subscribed, "sdfsdfdsds"); retreived.addSubscription(subscription); retreived.approveSubscription(subscription, true); retreived.saveToDB();

È stato utile?

Soluzione

atlast i have found it. it was simple

just one line

retreived.createSubscription(null, new JID("dinga@exalanche"), new JID("dinga@exalanche"), false, null);
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top