The first requirement is to build a very simple Chat messenger that would be used to set Availaibility in OpenFire Server. This chat messenger will also be used for one on one chat. Only one chat can occur at any given time. The chat messenger doesn't need any friends list, rooms, etc.
The second requirement is to build a Ajax (push) based web client that can talk to the above mentioned Chat Messenger.
Key considerations -
1) There will be no friends list or rooms in the web client or in the messenger.
2) The one on one chat can only be started by the web client. Chat cannot be started from the chat messenger.
3) If user1 initiates a chat (from the web client) with the logged in user2 (through the chat messenger), the user1 will see a window that shows - contacting user2. The user 2 will be prompted to accept or deny the chat request. If the user 2 accepts the chat request, the user2 will see an im window connected to the user1, the user1 will see an im window (on the web client) connected to the user2 and both the users can chat.
3) As soon as any user logged in through the chat messenger accepts a chat request, this users status will change to busy, similarly when the chat is over, the status will change back to available.
4) There is no send button on the chat window for the web client or the messenger, the messages are displayed as the user types, so for eg if user1 is talking with user2, in the chat window as the user1 types, user 2 sees it in his chat window and vice versa.
5) The chat will be stored in the database. A java service method will be provided to you to save the chat in the database which could be called from the web chat or the chat messenger.
Source Codes to look at -
1) For Chat messenger - Spark (OpenFire chat messenger). This is a full fledged chat messenger, its open source. Basically what we need is 1/4th functionality of this.
2) Ajax Based Web Chats for Jabber (OpenFire) - ijab, jwchat.