use of org.jivesoftware.smackx.pubsub.LeafNode in project Smack by igniterealtime.
the class PubSubTestCase method getRandomPubnode.
protected LeafNode getRandomPubnode(PubSubManager pubMgr, boolean persistItems, boolean deliverPayload) throws XMPPException {
ConfigureForm form = new ConfigureForm(FormType.submit);
form.setPersistentItems(persistItems);
form.setDeliverPayloads(deliverPayload);
form.setAccessModel(AccessModel.open);
return (LeafNode) pubMgr.createNode("/test/Pubnode" + System.currentTimeMillis(), form);
}
use of org.jivesoftware.smackx.pubsub.LeafNode in project Smack by igniterealtime.
the class PEPManager method publish.
/**
* Publish an event.
*
* @param item the item to publish.
* @param node the node to publish on.
* @throws NotConnectedException
* @throws InterruptedException
* @throws XMPPErrorException
* @throws NoResponseException
*/
public void publish(Item item, String node) throws NotConnectedException, InterruptedException, NoResponseException, XMPPErrorException {
XMPPConnection connection = connection();
PubSubManager pubSubManager = PubSubManager.getInstance(connection, connection.getUser().asEntityBareJid());
LeafNode pubSubNode = pubSubManager.getNode(node);
pubSubNode.publish(item);
}
Aggregations