aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/xmpp/stanzas
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/xmpp/stanzas')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/xmpp/stanzas/IqPacketGenerator.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/xmpp/stanzas/IqPacketGenerator.java b/src/main/java/de/thedevstack/conversationsplus/xmpp/stanzas/IqPacketGenerator.java
new file mode 100644
index 00000000..27e6607f
--- /dev/null
+++ b/src/main/java/de/thedevstack/conversationsplus/xmpp/stanzas/IqPacketGenerator.java
@@ -0,0 +1,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
+ }
+}