#include <MessageParser.h>
Inheritance diagram for CODEX_Server::MessageParser:


Public Member Functions | |
| MessageParser () | |
| Constructor. | |
| virtual | ~MessageParser () |
| Virtual destructor. | |
| virtual void | operator() (unsigned char *server, unsigned char *mID, CODEX_Quorum::Message *m)=0 |
| Parse and dispatch a message. | |
| virtual bool | handler (EventAck &event) |
| The base class is responsible for handling acknowledgements, which are relevant to whether the Activity is ready for deletion. | |
Protected Member Functions | |
| void | sendEvent (EventBase *event, Activity *source, bool failure=false) |
| void | enableTerminate () |
| This method should be called when an Activity has received a CloseEvent or other indicator that it is no longer needed. | |
Protected Attributes | |
| DeadPileType & | m_deadPile |
| The pile of Activity%s to be garbage-collected. | |
| QType & | m_queue |
| The event queue. | |
All message categories should define a MessageParser, which can then be used to read messages in marshalled form and construct appropriately typed objects from the messages. The resulting object should then be dispatched as an event, and the parser absorbs the acknowledgments.
MessageParser inherits CODEX_Events::Activity as a virtual base class so that a concrete class inheriting multiple abstract type-specific bases will have only one copy of type Activity. This eliminates ambiguity with regards to event counts and object deletion. It also allows us to use a default constructor, since the arguments forwarded to Activity::Activity() will never actually be passed. Instead, the derived class should pass arguments directly to Activity::Activity() in its constructor.
Definition at line 43 of file CODEX_Server/MessageParser.h.
|
|
This method should be called when an Activity has received a CloseEvent or other indicator that it is no longer needed. Actual termination will not occur until there are no remaining events outstanding (unacknowledged). Definition at line 63 of file Activity.cc. Referenced by CODEX_KeyService::ClientActivity::handler(), and CODEX_KeyService::ClientActivity::processRequest(). |
|
|
The base class is responsible for handling acknowledgements, which are relevant to whether the Activity is ready for deletion. If a derived class reimpliments this method, it must call this version explicitly. Definition at line 39 of file Activity.cc. Referenced by CODEX_Events::EventAck::handle(), and CODEX_KeyService::ClientActivity::handler(). |
|
||||||||||||||||
|
Parse and dispatch a message. The memory for all arguments is taken over by the MessageParser.
Implemented in CODEX_APSS::MessageParser, CODEX_KeyService::ClientMessageParser, and CODEX_KeyService::ClientResponseParser. |
|
||||||||||||||||
1.4.1