Search in sources :

Example 1 with IoTDisown

use of org.jivesoftware.smackx.iot.discovery.element.IoTDisown in project Smack by igniterealtime.

the class IoTDisownProvider method parse.

@Override
public IoTDisown parse(XmlPullParser parser, int initialDepth) throws Exception {
    Jid jid = ParserUtils.getJidAttribute(parser);
    NodeInfo nodeInfo = NodeInfoParser.parse(parser);
    return new IoTDisown(jid, nodeInfo);
}
Also used : Jid(org.jxmpp.jid.Jid) NodeInfo(org.jivesoftware.smackx.iot.element.NodeInfo) IoTDisown(org.jivesoftware.smackx.iot.discovery.element.IoTDisown)

Example 2 with IoTDisown

use of org.jivesoftware.smackx.iot.discovery.element.IoTDisown in project Smack by igniterealtime.

the class IoTDiscoveryManager method disownThing.

public void disownThing(Jid registry, Jid thing, NodeInfo nodeInfo) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
    interactWithRegistry(registry);
    IoTDisown iotDisown = new IoTDisown(thing, nodeInfo);
    iotDisown.setTo(registry);
    connection().createStanzaCollectorAndSend(iotDisown).nextResultOrThrow();
}
Also used : IoTDisown(org.jivesoftware.smackx.iot.discovery.element.IoTDisown)

Aggregations

IoTDisown (org.jivesoftware.smackx.iot.discovery.element.IoTDisown)2 NodeInfo (org.jivesoftware.smackx.iot.element.NodeInfo)1 Jid (org.jxmpp.jid.Jid)1