Skip to content
deruelle edited this page Dec 17, 2014 · 2 revisions

Table of Contents

Service Description

A chat server is a virtual location where many instant messenger applications can talk to each other.

Messages that arrive in a chat room are broadcast to all other people in the room. In other words, all messages are seen by all users. This means when a message arrives at our server application, the user's address will be added to a list. Then the message will be sent to all users in that list.

Additionally, you could implement "commands." A command begins with a forward slash (/) and is not broadcast, but instead is processed by the server itself for special features. The commands implemented are:

  * /join: Silently enter a chat room without broadcasting anything.
  * /who: Print the list of all users in this chat room.
  * /quit: Leave the chat room; no more messages will come in.

How to activate it

From the binary

Download the latest version of the war file corresponding to this example from here

Drop the downloaded war file into your tomcat_home/webapps directory or jboss_home/server/default/deploy directory Get the corresponding dar configuration file.

To understand what the dar configuration file is used for, check the Application Router Documentation .

Drop it in your tomcat_home/conf/dars directory or jboss_home/server/default/conf/dars directory.

To use this dar file for this service, specify in the Service xml tag, darConfigurationFileLocation attribute of the tomcat_home/conf/server.xml file or jboss_home/server/default/deploy/jboss-web.deployer/server.xml , the following : conf/dars/speed-dial-dar.properties

You can now run your container (Tomcat or Jboss).

From the source

Please check out the speed dial example located under this location from the svn repository. Just call mvn clean install war:inplace to create the war file in the target directory

How to play with it

Starts Two sip phones.

Starts Two SIP Chat Clients. Point them to sip:[email protected]:5080

Type your message and then click on the send button

You should see the messages in both clients once they are both in the chat server (that is when they sent at least one message to it).