use of org.jivesoftware.smackx.iot.discovery.element.IoTRemove in project Smack by igniterealtime.
the class IoTDiscoveryManager method removeThing.
public void removeThing(Jid registry, BareJid thing, NodeInfo nodeInfo) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
interactWithRegistry(registry);
IoTRemove iotRemove = new IoTRemove(thing, nodeInfo);
iotRemove.setTo(registry);
connection().createStanzaCollectorAndSend(iotRemove).nextResultOrThrow();
// We no not update the ThingState here, as this is done in the <removed/> IQ handler above.;
}
use of org.jivesoftware.smackx.iot.discovery.element.IoTRemove in project Smack by igniterealtime.
the class IoTRemoveProvider method parse.
@Override
public IoTRemove parse(XmlPullParser parser, int initialDepth) throws Exception {
Jid jid = ParserUtils.getJidAttribute(parser);
if (jid.hasResource()) {
throw new SmackException("JID must be without resourcepart");
}
BareJid bareJid = jid.asBareJid();
NodeInfo nodeInfo = NodeInfoParser.parse(parser);
return new IoTRemove(bareJid, nodeInfo);
}
Aggregations