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

Class COM.roguewave.jchat.Dispatcher

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

public class Dispatcher
extends Thread
The Dispatcher abstract class. Dispatcher must be subclassed and the abstract methods must be implemented before it can be instantiated.

The Dispatcher class represents a class which keeps track of multiple socket Connections. The processCommandSet should be overridden to provide a means of receiving a command set from a Connection and then notifying the necessary objects that are added to the Dispatcher through the addObjectToNotify method.

See Also:
Connection

Variable Index

 o connections_

Constructor Index

 o Dispatcher()
Creates a Dispatcher.

Method Index

 o addConnection(Connection)
Add a Connection to the Dispatcher.
 o addObjectToNotify(String, Object)
Add a notifier object to the dispatcher.
 o processCommand(String[])
Process a command This method must be overridden and implemented by a subclass.

Variables

 o connections_
  protected Hashtable connections_

Constructors

 o Dispatcher
  public Dispatcher()
Creates a Dispatcher.

Methods

 o addConnection
  public synchronized void addConnection(Connection aConnection)
Add a Connection to the Dispatcher.
 o addObjectToNotify
  public synchronized abstract void addObjectToNotify(String index,
                                                      Object aObject)
Add a notifier object to the dispatcher. This method must be overridden and implemented by a subclass.
 o processCommand
  public synchronized abstract void processCommand(String command[])
Process a command This method must be overridden and implemented by a subclass.

All Packages  Class Hierarchy  This Package  Previous  Next  Index