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

/**
 * 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
    }
}