aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/xmpp/stanzas/ErrorIqPacket.java
blob: 3f87202eccefb895ad0f3cb5d6241043fb60e8d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package de.thedevstack.conversationsplus.xmpp.stanzas;

import de.thedevstack.conversationsplus.xml.Element;

/**
 */
public class ErrorIqPacket extends IqPacket {
    public final static String NAMESPACE = "urn:ietf:params:xml:ns:xmpp-stanzas";

    public ErrorIqPacket(IqErrorCondition condition) {
        super(IqPacket.TYPE.ERROR);
        final Element error = this.addChild("error");
        error.setAttribute("type", condition.getType().toString());
        error.addChild(condition.toString(), NAMESPACE);
    }
}