Smack/XMPP newbie question

Hi there,

I am new to the whole XMPP usage/protocol. So do excuse my ignorance. I have a few questions

  1. Is there a way to use a jabber server just as a precense detecter?

  2. How do I setup anonymous login in smack with a jabber server? I did read the documentation of SASLAuthentication, but I am missing as to how to use it in real code. I want to be able to get a connection and send a message after anonymously connected.

  3. Is there a good testing tool to test multiuser chat on a jabber server?

Thanks for your time!

  1. No one is forcing you to do anything but log users in and set their presence.

  2. You can enable and disable anonymous logings in the XMPP server you are using. In Openfire, log into the admin consule and choose Server -> Server Settings -> Registration and Login. Anonymous login is controlled there.

  3. Not aware of any specific tool for testing. The way I am running tests is using a Java app that logs into a room and sends messages on a timed basis. Spawning threads that do the same thing can also help in simulating real-life conditions.

  1. Ok that makes sense.

  2. I understand how it can be configured. How to I make a anonymous connection via Smack, in otherwords, do you have a code snippet which uses the SASLAuthentication to do anonymous login.

  3. Thanks, that is what I was thinking too, I read a little about Tsung, but not sure how helpful it would be to test…

Not sure how it is affected by SASL, but XMPPConnection has a method simply called loginAnonymously (http://www.igniterealtime.org/builds/smack/docs/latest/javadoc/org/jivesoftware/ smack/XMPPConnection.html#loginAnonymously()).