XMPP Java bot loop question
- From: Sabine Dinis Blochberger <no.spam@xxxxxxxxxxxx>
- Date: Tue, 31 Jul 2007 12:58:27 +0100
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
.
- Follow-Ups:
- Re: XMPP Java bot loop question
- From: Roedy Green
- Re: XMPP Java bot loop question
- Prev by Date: Re: Swing
- Next by Date: Re: non blocking write on TCP/IP channel
- Previous by thread: Swing
- Next by thread: Re: XMPP Java bot loop question
- Index(es):
Relevant Pages
|