diff options
author | steckbrief <steckbrief@chefmail.de> | 2016-01-15 21:57:36 +0100 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2016-01-15 21:57:36 +0100 |
commit | d44debab6726edbac07901a2b94a07f2ef4771ee (patch) | |
tree | dda34feb85f53996cb5aa68063365ae3e8403195 /src/main/java/de/thedevstack/conversationsplus/xmpp/stanzas | |
parent | 1f40166b3105ab78ce02339b16c9cb9eea921ec7 (diff) |
Introducing some specialized IqPacketGenerators
- IqPacketGenerator
- PubSubPacketGenerator
- AvatarPacketGenerator
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/xmpp/stanzas')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/xmpp/stanzas/IqPacketGenerator.java | 31 |
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 + } +} |