protected PubSub createPubsubPacket(Type type, NodeExtension ext) { return PubSub.createPubsubPacket(pubSubManager.getServiceJid(), type, ext); }
PubSubException.NotALeafNodeException.class.getDeclaredConstructor(String.class, BareJid.class); exceptionConstructor.setAccessible(true); throw exceptionConstructor.newInstance(nodeName, pubSubManager.getServiceJid());
/** * Discover node information in standard {@link DiscoverInfo} format. * * @return The discovery information about the node. * @throws XMPPErrorException * @throws NoResponseException if there was no response from the server. * @throws NotConnectedException * @throws InterruptedException */ public DiscoverInfo discoverInfo() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { DiscoverInfo info = new DiscoverInfo(); info.setTo(pubSubManager.getServiceJid()); info.setNode(getId()); return pubSubManager.getConnection().createStanzaCollectorAndSend(info).nextResultOrThrow(); }
/** * Get information on the items in the node in standard * {@link DiscoverItems} format. * * @return The item details in {@link DiscoverItems} format * @throws XMPPErrorException * @throws NoResponseException if there was no response from the server. * @throws NotConnectedException * @throws InterruptedException */ public DiscoverItems discoverItems() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { DiscoverItems items = new DiscoverItems(); items.setTo(pubSubManager.getServiceJid()); items.setNode(getId()); return pubSubManager.getConnection().createStanzaCollectorAndSend(items).nextResultOrThrow(); }