Pergunta

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

Foi útil?

Solução

atlast i have found it. it was simple

just one line

retreived.createSubscription(null, new JID("dinga@exalanche"), new JID("dinga@exalanche"), false, null);
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top