Contains all services for the chat application.
Chatsystem
The main functionality of the chatsystem is offerred by the chatserver.
It provides in the communication with the clients, handling of messages and storage of client and channel information.
To make life a little easier and for better program structure it starts a
couple of servers for each added functionality.
- {@link quest.server.chat.ChannelServer} for handling channel overview
requests from the clients.
- {@link quest.server.chat.RankingServer} for handling ranking overview
requests from the clients.
- {@link quest.server.chat.SearchServer} for handling username search
requests from the clients.
Interaction with the gameserver
The chatserver will at some moment receive a request from the administrator
of a channel to start a game. It then collects all needed information and
hands this to the gameserver, who starts and handles the game.
During the game the clients can still talk to eachother in the chatwindow
so that doesn't change.
The game can be ended in a couple of ways:
- The administrator can choose 'abortgame' in the chatwindow: the chatserver will then contact the gameserver to inform him that the game has to be stopped.
The channel is then put in 'before game' state so all clients can try to get ready for a new game.
- The administrator can choose 'stopgame' in the chatwindow: the chatserver
will then contact the gameserver to inform him that the game has to be stopped.
The channel is then put in 'after game' state so all clients can evaluate the game.
- The chatserver receives from the gameserver a notification that the game was ended. The channel is then put in 'after game' state so all clients can evaluate the game.
Database
The {@link quest.server.chat.ChatUsers} database stores all information about
the clients needed for chat communication. This includes for instance their
username, the list of channels the user is currently in and the usermode
of the user in each of these channels.
The {@link quest.server.chat.Channels} database stores all information about
the channels needed for chat operations. This includes for instance the
name each channel, the list of users who are in that channel and the
current mode of the channel.
@author Merijn Evertse