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

CODEX_KeyService::RoutedClientMessageEvent< MT > Class Template Reference

This class decorates a ClientMessageEvent that has been dispatched by a delegate with RoutingInfo that allows the message to be routed back to the originating server. More...

#include <RoutedClientMessageEvent.h>

Inheritance diagram for CODEX_KeyService::RoutedClientMessageEvent< MT >:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 RoutedClientMessageEvent (CODEX_Events::Activity *source, RoutedClientMessageHandler *destination, unsigned char *server, unsigned char *seqNum)
 Create a RoutedClientMessageEvent.
virtual ~RoutedClientMessageEvent ()
 Virtual destructor.
bool handle ()
 Handle this event -- invokes the appropriate handler from the destination Activity, which must have type ClientMessageHandler.
void reRoute (RoutedClientMessageHandler *newDestination)
 Specify a new handler for this event.
bool failed () const
 Whether event processing failed.
void setFailed ()
 Flag that processing this message failed.
ClientMessageHandlerdestination () const
 The destination.
const MT & message () const
 The wrapped object.
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.
const unsigned char * server () const
 The ID of the server.
const unsigned char * seqNum () const
 The unique ID for a request from server.

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::RoutedClientMessageEvent< MT >

This class decorates a ClientMessageEvent that has been dispatched by a delegate with RoutingInfo that allows the message to be routed back to the originating server.

Definition at line 37 of file RoutedClientMessageEvent.h.


Constructor & Destructor Documentation

template<class MT>
CODEX_KeyService::RoutedClientMessageEvent< MT >::RoutedClientMessageEvent CODEX_Events::Activity source,
RoutedClientMessageHandler destination,
unsigned char *  server,
unsigned char *  seqNum
[inline]
 

Create a RoutedClientMessageEvent.

This class takes ownership of server and seqNum.

Definition at line 45 of file RoutedClientMessageEvent.h.


Member Function Documentation

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

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 file:
Generated on Fri May 6 17:42:21 2005 for COrnell Data EXchange (CODEX) by  doxygen 1.4.1