Applet/Chat woes

V

VisionSet

I have to write a chat client using the Jabber (XMPP) protocol. This
is to be accessed from a regular java web app by browser users in a
simple manner. I won't be using java web start at the moment (I may
later). At the moment I have an invisible Applet (yuk I know) that
connects to the chat server, but because applets virtually always
dispose on page nav, I have to close the connection and reconnect each
time. I can't serialise the connection, it isn't serialisable.
The invisible applet is just to maintain server connection, and hence
listen for chat requests. A sequence of dialogues accept or reject a
chat request and when both parties agree a browser window containing
the chat gui applet is created. Plenty of java chat apps exist like
this, it can't be this hard. What is a good way to do this? My main
problems stem from the ridiculous disconnect/reconnect, every reconnect
gets old chat request that have already been dealt with (XMPP quirk?)
Any advice welcome

Mike W
 
O

Oliver Wong

VisionSet said:
I have to write a chat client using the Jabber (XMPP) protocol. This
is to be accessed from a regular java web app by browser users in a
simple manner. I won't be using java web start at the moment (I may
later). At the moment I have an invisible Applet (yuk I know) that
connects to the chat server, but because applets virtually always
dispose on page nav, I have to close the connection and reconnect each
time. I can't serialise the connection, it isn't serialisable.
The invisible applet is just to maintain server connection, and hence
listen for chat requests. A sequence of dialogues accept or reject a
chat request and when both parties agree a browser window containing
the chat gui applet is created. Plenty of java chat apps exist like
this, it can't be this hard. What is a good way to do this? My main
problems stem from the ridiculous disconnect/reconnect, every reconnect
gets old chat request that have already been dealt with (XMPP quirk?)
Any advice welcome

The only implementation I've seen of this uses polling. Messages are
sent to a central server which acts as a message queue, and your invisible
applet would periodically check if messages are awaiting the currently
logged in viewer or not.

I don't know how compatible this would be with the XMPP protocol.

- Oliver
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top