سؤال

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();

هل كانت مفيدة؟

المحلول

atlast i have found it. it was simple

just one line

retreived.createSubscription(null, new JID("dinga@exalanche"), new JID("dinga@exalanche"), false, null);
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top