aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/xmpp/stanzas/IqPacketGenerator.java
blob: bdf0f4b046ec43fb6a8278eb78fc1df1cd38bffe (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.stanzas;

import eu.siacs.conversations.xmpp.stanzas.IqPacket;

/**
 * Created by tzur on 15.01.2016.
 */
public final class IqPacketGenerator {

    private static IqPacket generateIqPacket(IqPacket.TYPE type) {
        return new IqPacket(type);
    }

    public static IqPacket generateIqSetPacket() {
        return generateIqPacket(IqPacket.TYPE.SET);
    }

    public static IqPacket generateIqGetPacket() {
        return generateIqPacket(IqPacket.TYPE.GET);
    }

    public static IqPacket generateIqResultPacket() {
        return generateIqPacket(IqPacket.TYPE.RESULT);
    }

    public static IqPacket generateIqErrorPacket() {
        return generateIqPacket(IqPacket.TYPE.ERROR);
    }

    private IqPacketGenerator() {
        // avoid Instantiation
    }
}