Class COM.roguewave.jchat.ForumDispatcher
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class COM.roguewave.jchat.ForumDispatcher

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----COM.roguewave.jchat.Dispatcher
                   |
                   +----COM.roguewave.jchat.ForumDispatcher

public class ForumDispatcher
extends Dispatcher
The ForumDispatcher class.

The ForumDispatcher class implements a specialized Dispatcher for the JChat server. The ForumDispatcher maintains a list of Forums that are notified when a command is processed.

See Also:
Dispatcher, Forum

Constructor Index

 o ForumDispatcher()
Creates a ForumDispatcher.

Method Index

 o addConnection(Connection)
Add initialization functionality when adding new Connections.
 o addObjectToNotify(String, Object)
Adds a new Forum object that should be notified when the "post" command is processed.
 o processCommand(String[])
Process a command request.
 o sendForumNames(Connection)
Sends the current collection of Forum names to the specified Connection.

Constructors

 o ForumDispatcher
  public ForumDispatcher()
Creates a ForumDispatcher. Two default Forums are created:
  New Users
  Suggestions
See Also:
Forum

Methods

 o addConnection
  public synchronized void addConnection(Connection aConnection)
Add initialization functionality when adding new Connections.
Overrides:
addConnection in class Dispatcher
 o addObjectToNotify
  public synchronized void addObjectToNotify(String forumName,
                                             Object aObject)
Adds a new Forum object that should be notified when the "post" command is processed.
Overrides:
addObjectToNotify in class Dispatcher
 o sendForumNames
  public synchronized void sendForumNames(Connection aConnection)
Sends the current collection of Forum names to the specified Connection.
 o processCommand
  public synchronized void processCommand(String command[])
Process a command request. The following commands are understood:
  attach "forumname" "username" ""
  detach "forumname" "username" ""
  create "forumname" "username" ""
  post   "forumname" "username" "message"
  close  ""          "username" ""
Overrides:
processCommand in class Dispatcher

All Packages  Class Hierarchy  This Package  Previous  Next  Index