aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/xmpp/pubsub/PubSubPacket.java
blob: fea1383ced495a9fa770e67f0a930866d020b551 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package de.thedevstack.conversationsplus.xmpp.pubsub;

import de.thedevstack.conversationsplus.xml.Element;
import de.thedevstack.conversationsplus.xmpp.stanzas.IqPacket;

/**
 * Created by tzur on 15.01.2016.
 */
public class PubSubPacket extends IqPacket {
    public static final String NAMESPACE = "http://jabber.org/protocol/pubsub";
    public static final String ELEMENT_NAME = "pubsub";
    private Element pubSubElement;

    public PubSubPacket(IqPacket.TYPE type) {
        super(type);
        this.pubSubElement = super.addChild(PubSubPacket.ELEMENT_NAME, PubSubPacket.NAMESPACE);
    }

    @Override
    public Element addChild(Element child) {
        return this.pubSubElement.addChild(child);
    }

    @Override
    public Element addChild(String name) {
        return this.pubSubElement.addChild(name);
    }

    @Override
    public Element addChild(String name, String xmlns) {
        return this.pubSubElement.addChild(name, xmlns);
    }
}