Пример #1
0
 /**
  * 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
  */
 public DiscoverInfo discoverInfo()
     throws NoResponseException, XMPPErrorException, NotConnectedException {
   DiscoverInfo info = new DiscoverInfo();
   info.setTo(to);
   info.setNode(getId());
   return (DiscoverInfo) con.createPacketCollectorAndSend(info).nextResultOrThrow();
 }
Пример #2
0
 /**
  * Update the configuration with the contents of the new {@link Form}
  *
  * @param submitForm
  * @throws XMPPErrorException
  * @throws NoResponseException
  * @throws NotConnectedException
  */
 public void sendConfigurationForm(Form submitForm)
     throws NoResponseException, XMPPErrorException, NotConnectedException {
   PubSub packet =
       createPubsubPacket(
           Type.set,
           new FormNode(FormNodeType.CONFIGURE_OWNER, getId(), submitForm),
           PubSubNamespace.OWNER);
   con.createPacketCollectorAndSend(packet).nextResultOrThrow();
 }