powered by Jive Software

Is it possible to use smack only to parse and create xmpp messages and not send recv them

Hi All ,

I am new to smack and need your help deciding on something:

  1. Actually I want to create a group chat application ( I cant find any good groupchat application that supports good performance ,free and embeddeble on custome wesites if you are aware of any please let me know ).

In my groupchat application I am thinking of deploying on google app engine hence i can use Google appengine RPC to communicate between my chat server and client , and not using xmpp messages bettween them as google charges for every xmpp message and if needed in future I will start using xmpp messages on wire…

So what i want is to create and send recv xmpp messages but not using the xmpp protocol on wire but just using google app engine rpc mechanism.

Here is the flow

GWT Chat Client --------------------------------------------------------- My Chat Server ( Google app engine )

( Here I want to send/recv xmpp messages but encapsulated in RPC data)

So for encoding /decoding of xmpp messages i want to use smack api .

Can anybody let me know if its feasible and a good idea to go ahead.

Alternatively if anybody can suggest me any chat room kind of free service where i can create multiple chatroom at runtime and can customise some GUI for it that will be great .

Speeqe seemed ok but i was not able to integarate on my website if anybod have any pointers please provide.

Thanks

Saurabh

All subclasses of Packet in Smack have a toXML() method which take the populated Packet object and turns it into the relevant packet in string form.

As for parsing, you should look at the PacketParserUtils class. It has a bunch of static methods which you pass an XMLPullParser instance which points to the start of a packet string, and returns the relevant Packet object (either an IQ, Message or Presence Packet, which can contain extensions).

As for *should *you do it this way, I don’t know but it seems like it would be easier to go with a normal XMPP setup from the start.

I’ve committed an abstract Connection class SMACK-279 to the trunk. Now you should be able to implement a new Connection (GWT or whatever) and benefit from all implemented extensions. You could also try to use the bosh branch (from subversion) and implement a new HTTPSender (for the http://jbosh.kenai.com/ library) which uses the API provided by google.

[Edited:] Sorry I can’t correct the order of my post, it seems there is a bug of the forum.