XMPP Java bot loop question



I want to write a bot for XMPP (Jabber) in Java (1.6) using smack
libraries (http://www.igniterealtime.org).

I have already written a GUI client using smack, so I'm familiar with
how it works.

For the bot however, I'm in doubt about the main loop in combination
with event listeners. The bot basically just sits idly (until explicitly
stopped) listening for presence changes of contacts. The presence
changes are dealt with by a roster listener.

How would I wait for those events and have the application keep
executing? I am a bit clueless aobut threads in Java, but I have used
them in Delphi...

On a side note, if anyone can shed light on how to use the commons
daemon (http://commons.apache.org/daemon/), that would be useful later
on.

Many thanks in advance,
--
Sabine Dinis Blochberger

Op3racional
www.op3racional.eu
.



Relevant Pages

  • Re: robot at cheap price...
    ... Your other reply mentioned Java. ... I designed a beginner's robot that uses the Mega 8 for some articles I ... bot which uses CDS light detectors. ... you with programming questions if you decide to build my bot and ...
    (comp.robotics.misc)
  • Re: Wie kann ich aus dem Speicher von laufenden Prozessen lesen?
    ... ich dachte daran einen einfachen WoW Bot in Java zu programmieren, ... Ich habe im Internet nach solch einer JNI Implementierung gesucht aber ... Kennt jemand vielleicht doch so ein Framework? ... Du solltest Java da komplett vergessen ...
    (de.comp.lang.java)
  • Re: Forming HTTP request from java code
    ... the code shall remain "pure-Core" Java. ... HTTPUrlConnection got lost in the ... Specially this simple java bot by Dolmen: http://www.searchlores.org/dolmen_2.htm ... I am able to retrieve google homepage (and other pages too using the ...
    (comp.lang.java.programmer)