Arc::Message Class Reference

Object being passed through chain of MCCs. More...

#include <Message.h>

Public Member Functions

 Message (void)
 Message (Message &msg)
 Message (long msg_ptr_addr)
 ~Message (void)
Messageoperator= (Message &msg)
MessagePayloadPayload (void)
MessagePayloadPayload (MessagePayload *payload)
MessageAttributesAttributes (void)
MessageAuthAuth (void)
MessageContextContext (void)
MessageAuthContextAuthContext (void)
void Context (MessageContext *ctx)
void AuthContext (MessageAuthContext *auth_ctx)

Detailed Description

Object being passed through chain of MCCs.

An instance of this class refers to objects with main content (MessagePayload), authentication/authorization information (MessageAuth) and common purpose attributes (MessageAttributes). Message class does not manage pointers to objects and their content. It only serves for grouping those objects. Message objects are supposed to be processed by MCCs and Services implementing MCCInterface method process(). All objects constituting content of Message object are subject to following policies:

1. All objects created inside call to process() method using new command must be explicitely destroyed within same call using delete command with following exceptions. a) Objects which are assigned to 'response' Message. b) Objects whose management is completely acquired by objects assigned to 'response' Message.

2. All objects not created inside call to process() method are not explicitely destroyed within that call with following exception. a) Objects which are part of 'response' Method returned from call to next's process() method. Unless those objects are passed further to calling process(), of course.

3. It is not allowed to make 'response' point to same objects as 'request' does on entry to process() method. That is needed to avoid double destruction of same object. (Note: if in a future such need arises it may be solved by storing additional flags in Message object).

4. It is allowed to change content of pointers of 'request' Message. Calling process() method must not rely on that object to stay intact.

5. Called process() method should either fill 'response' Message with pointers to valid objects or to keep them intact. This makes it possible for calling process() to preload 'response' with valid error message.


Constructor & Destructor Documentation

Arc::Message::Message ( void   )  [inline]

true if auth_ctx_ was created internally Dummy constructor

Arc::Message::Message ( Message msg  )  [inline]

Copy constructor. Ensures shallow copy.

Arc::Message::Message ( long  msg_ptr_addr  ) 

Copy constructor. Used by language bindigs

Arc::Message::~Message ( void   )  [inline]

Destructor does not affect refered objects except those created internally


Member Function Documentation

MessageAttributes* Arc::Message::Attributes ( void   )  [inline]

Returns a pointer to the current attributes object or creates it if no attributes object has been assigned.

MessageAuth* Arc::Message::Auth ( void   )  [inline]

Returns a pointer to the current authentication/authorization object or creates it if no object has been assigned.

void Arc::Message::AuthContext ( MessageAuthContext auth_ctx  )  [inline]

Assigns auth* context object

MessageAuthContext* Arc::Message::AuthContext ( void   )  [inline]

Returns a pointer to the current auth* context object or creates it if no object has been assigned.

void Arc::Message::Context ( MessageContext ctx  )  [inline]

Assigns message context object

MessageContext* Arc::Message::Context ( void   )  [inline]

Returns a pointer to the current context object or creates it if no object has been assigned. Last case should happen only if first MCC in a chain is connectionless like one implementing UDP protocol.

Message& Arc::Message::operator= ( Message msg  )  [inline]

Assignment. Ensures shallow copy.

MessagePayload* Arc::Message::Payload ( MessagePayload payload  )  [inline]

Replaces payload with new one. Returns the old one.

MessagePayload* Arc::Message::Payload ( void   )  [inline]

Returns pointer to current payload or NULL if no payload assigned.


The documentation for this class was generated from the following file:
Generated on Wed Jun 27 11:54:24 2012 for Hosting Environment (Daemon) by  doxygen 1.6.3