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.java33
1 files changed, 33 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..bdf0f4b0
--- /dev/null
+++ b/src/main/java/de/thedevstack/conversationsplus/xmpp/stanzas/IqPacketGenerator.java
@@ -0,0 +1,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
+ }
+}