aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/xmpp/stanzas
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2016-01-15 22:15:00 +0100
committersteckbrief <steckbrief@chefmail.de>2016-01-15 22:15:00 +0100
commit69145c02f2ba357a95b38575bdc0eca40a837bae (patch)
treecc9ccda0e22a924818134048f2c0c87f679cc1e3 /src/main/java/de/thedevstack/conversationsplus/xmpp/stanzas
parent424477dfbc84f12af8223b004692d84b0d3ea5aa (diff)
parentd44debab6726edbac07901a2b94a07f2ef4771ee (diff)
Merge remote-tracking branch 'remotes/origin/trz/rename' into trz/rebase
Cast problem fixed
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
+ }
+}