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
-
ForumDispatcher()
- Creates a ForumDispatcher.
-
addConnection(Connection)
- Add initialization functionality when adding new Connections.
-
addObjectToNotify(String, Object)
- Adds a new Forum object that should be notified when the "post" command is
processed.
-
processCommand(String[])
- Process a command request.
-
sendForumNames(Connection)
- Sends the current collection of Forum names to the specified Connection.
ForumDispatcher
public ForumDispatcher()
- Creates a ForumDispatcher. Two default Forums are created:
New Users
Suggestions
- See Also:
- Forum
addConnection
public synchronized void addConnection(Connection aConnection)
- Add initialization functionality when adding new Connections.
- Overrides:
- addConnection in class Dispatcher
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
sendForumNames
public synchronized void sendForumNames(Connection aConnection)
- Sends the current collection of Forum names to the specified Connection.
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