2014-02-28 92 views
0

我正在爲openfire編寫一個插件。在這個插件中,我想創建節點並訂閱客戶端到這個節點。我成功創建節點,但我無法訂閱客戶端。我使用此代碼來subcibe客戶端,但沒有用。Openfire服務器端訂閱節點

Node retreived = pubsub.getNode(nodeId); NodeSubscription subscription = new NodeSubscription(retreived, new JID(「dinga @ exalanche」),new JID(「dinga @ exalanche」), State.subscribed,「sdfsdfdsds」); retreived.add訂閱(訂閱); retreived.approveSubscription(subscription,true); retreived.saveToDB();

回答