Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CODEX_Server::ServerMessageDispatcher Class Reference

This is a concrete CODEX_Quorum::MessageDispatcher. More...

#include <ServerMessageDispatcher.h>

Inheritance diagram for CODEX_Server::ServerMessageDispatcher:

Inheritance graph
[legend]
Collaboration diagram for CODEX_Server::ServerMessageDispatcher:

Collaboration graph
[legend]
List of all members.

Public Types

typedef map< unsigned char,
MessageParser * > 
MapType
 Useful short name.

Public Member Functions

 ServerMessageDispatcher ()
 Constructor.
virtual ~ServerMessageDispatcher ()
 Virtual destructor.
void operator() (CODEX_Quorum::Message *m)
bool addParser (unsigned char mType, MessageParser *mp)
 Add another parser to the internal list.
virtual void operator() (Message *m)=0
 Method used to dispatch a message.

Detailed Description

This is a concrete CODEX_Quorum::MessageDispatcher.

It is designed for a system in which different classes of messages are distinguished by a one-byte type identifier, after which class-specific parsers are employed. This is dynamically configurable, in that new parsers can be added at any time, as long as they use unique type identifers.

Definition at line 37 of file ServerMessageDispatcher.h.


Member Function Documentation

bool ServerMessageDispatcher::addParser unsigned char  mType,
MessageParser mp
 

Add another parser to the internal list.

Parameters:
mType The unique message type identifier.
mp The appropriate parser for this type.
Returns:
true if the parser was successfully added, false otherwise.

Definition at line 71 of file ServerMessageDispatcher.cc.

virtual void CODEX_Quorum::MessageDispatcher::operator() Message m  )  [pure virtual, inherited]
 

Method used to dispatch a message.

Parameters:
m A Message to dispatch, including all headers. This object takes ownership of the Message.


The documentation for this class was generated from the following files:
Generated on Fri May 6 17:42:44 2005 for COrnell Data EXchange (CODEX) by  doxygen 1.4.1