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

CODEX_KeyService::ClientMessageEvent< MT > Class Template Reference

This class wraps a message from a client in an event. More...

#include <ClientMessageEvent.h>

Inheritance diagram for CODEX_KeyService::ClientMessageEvent< MT >:

Inheritance graph
[legend]
Collaboration diagram for CODEX_KeyService::ClientMessageEvent< MT >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ClientMessageEvent (CODEX_Events::Activity *source, ClientMessageHandler *destination)
 Create a ClientMessageEvent specifying the source and destination.
 ClientMessageEvent (CODEX_Events::Activity *source, ClientMessageHandler *destination, const MT &message)
 Create a ClientMessageEvent specifying the message.
virtual ~ClientMessageEvent ()
 Virtual destructor.
ClientMessageHandlerdestination () const
 The destination.
const MT & message () const
 The wrapped object.
bool handle ()
 Handle this event -- invokes the appropriate handler from the destination Activity, which must have type ClientMessageHandler.
void reRoute (ClientMessageHandler *newDestination)
 Re-route this event to another Activity.
bool unmarshal (unsigned char **pp, long length)
 Forwards an unmarshal request to the wrapped object.
Activitysource ()
 The Activity that created this event.

Protected Attributes

ClientMessageHandlerm_destination
 The CODEX_Events::Activity that handles this event.
Activity * m_source
 Source of this event.

Detailed Description

template<class MT>
class CODEX_KeyService::ClientMessageEvent< MT >

This class wraps a message from a client in an event.

The template argument is the message type, and specialization of the templated handler in ClientMessageHandler provides the needed polymorphism.

Definition at line 62 of file ClientMessageEvent.h.


Member Function Documentation

template<class MT>
void CODEX_KeyService::ClientMessageEvent< MT >::reRoute ClientMessageHandler newDestination  )  [inline]
 

Re-route this event to another Activity.

This is a much cheaper operation than copying the data to a new event. The CODEX_Events::Activity calling this should return false in its handler, so that the event will be re-added to the queue.

Definition at line 103 of file ClientMessageEvent.h.

References CODEX_KeyService::ClientMessageEvent< MT >::m_destination.


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