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

CODEX_KeyService::SupportedClientResponseEvent< RespT, ReqT > Class Template Reference

This class wraps a response for a client and its evidence in an event. More...

#include <SupportedClientResponseEvent.h>

Inheritance diagram for CODEX_KeyService::SupportedClientResponseEvent< RespT, ReqT >:

Inheritance graph
[legend]
Collaboration diagram for CODEX_KeyService::SupportedClientResponseEvent< RespT, ReqT >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef SupportedClientResponse<
RespT, ReqT > 
MsgType
 Useful shorthand.

Public Member Functions

 SupportedClientResponseEvent (CODEX_Events::Activity *source, unsigned char *server, unsigned char *seqNum, SupportedClientResponseHandler *destination, const MsgType &message)
 Create a SupportedClientResponseEvent.
 SupportedClientResponseEvent (CODEX_Events::Activity *source, unsigned char *server, unsigned char *seqNum, SupportedClientResponseHandler *destination)
 Create a SupportedClientResponseEvent.
virtual ~SupportedClientResponseEvent ()
 Virtual destructor.
const MsgTypemessage () const
 The wrapped object.
bool handle ()
 Handle this event -- invokes the appropriate handler from the destination Activity, which must have type ClientResponseHandler.
void reRoute (SupportedClientResponseHandler *newDestination)
 Re-route this event to another Activity.
int marshal (unsigned char **pp)
 Forwards a marshal request to the wrapped object.
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

Activity * m_source
 Source of this event.

Detailed Description

template<class RespT, class ReqT>
class CODEX_KeyService::SupportedClientResponseEvent< RespT, ReqT >

This class wraps a response for a client and its evidence in an event.

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

Definition at line 72 of file SupportedClientResponseEvent.h.


Member Function Documentation

template<class RespT, class ReqT>
void CODEX_KeyService::SupportedClientResponseEvent< RespT, ReqT >::reRoute SupportedClientResponseHandler 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 119 of file SupportedClientResponseEvent.h.


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