Pluggable_Messaging_Utils.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file     Pluggable_Messaging_Utils.h
00006  *
00007  *  $Id: Pluggable_Messaging_Utils.h 79705 2007-09-24 07:45:37Z johnnyw $
00008  *
00009  *   Utility classes for the TAO pluggable messaging framework.
00010  *
00011  *  @author  Balachandran Natarajan <bala@cs.wustl.edu>
00012  */
00013 //=============================================================================
00014 
00015 
00016 #ifndef TAO_PLUGGABLE_MESSAGING_UTILS_H
00017 #define TAO_PLUGGABLE_MESSAGING_UTILS_H
00018 
00019 #include /**/ "ace/pre.h"
00020 
00021 #include "tao/IOP_IORC.h"
00022 #include "tao/GIOPC.h"
00023 
00024 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00025 # pragma once
00026 #endif /* ACE_LACKS_PRAGMA_ONCE */
00027 
00028 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00029 
00030 class TAO_Transport;
00031 
00032 /**
00033  * @class TAO_Pluggable_Reply_Params_Base
00034  *
00035  * @brief TAO_Pluggable_Reply_Params_Base
00036  *
00037  * This represents a set of data that would be assembled by the
00038  * acceptor to pass to the connector. This base class is used by
00039  * TAO_ServerRequest. The child class TAO_Pluggable_Reply_Params
00040  * is used on the client side, and contains an additional
00041  * TAO_InputCDR member, not needed on the server side.
00042  */
00043 class TAO_Export TAO_Pluggable_Reply_Params_Base
00044 {
00045 public:
00046   /// Constructor.
00047   TAO_Pluggable_Reply_Params_Base (void);
00048 
00049   /// The IOP service context list.
00050   IOP::ServiceContextList svc_ctx_;
00051 
00052   /// The request id for which the reply we (connector) has received.
00053   CORBA::ULong request_id_;
00054 
00055   /**
00056    * Since this class no longer contains an NVList, this is the
00057    * way to determine if the request was DSI, so we can use Carlos'
00058    * service context list no-deep-copy optimization.
00059    */
00060   CORBA::Boolean is_dsi_;
00061 
00062   /// Info required for DSI optimization that pads the outgoing
00063   /// CDR stream according to the alignment of the NVList.
00064   ptrdiff_t dsi_nvlist_align_;
00065 
00066   /**
00067    * Get and Set methods for the service context list that we dont
00068    * own. This is useful for cases  where the application objects own
00069    * a service context list and would like to pass on their contents
00070    * without a copy.
00071    */
00072   IOP::ServiceContextList &service_context_notowned (void);
00073   void service_context_notowned (IOP::ServiceContextList *svc);
00074 
00075   /// A flag that indicates if there is any data is going to get
00076   /// marshalled in the reply
00077   CORBA::Boolean argument_flag_;
00078 
00079   GIOP::ReplyStatusType reply_status (void) const;
00080   void reply_status (GIOP::ReplyStatusType status);
00081 
00082   GIOP::LocateStatusType locate_reply_status (void) const;
00083   void locate_reply_status (GIOP::LocateStatusType status);
00084 
00085 protected:
00086   /// The service context list that we don't own.
00087   IOP::ServiceContextList *service_context_;
00088 private:
00089   /// The reply status.
00090   GIOP::ReplyStatusType reply_status_;
00091 
00092   /// The locate reply status
00093   GIOP::LocateStatusType locate_reply_status_;
00094 
00095 };
00096 
00097 /**
00098  * @class TAO_Pluggable_Reply_Params
00099  *
00100  * @brief TAO_Pluggable_Connector_Params
00101  *
00102  */
00103 class TAO_Export TAO_Pluggable_Reply_Params
00104   : public TAO_Pluggable_Reply_Params_Base
00105 {
00106 public:
00107   /// Constructor.
00108   TAO_Pluggable_Reply_Params (TAO_Transport *t);
00109 
00110   /// The stream with the non-demarshaled reply. This stream will be
00111   /// passed up to the stubs to demarshal the parameter values.
00112   TAO_InputCDR *input_cdr_;
00113 
00114   TAO_Transport *transport_;
00115 };
00116 
00117 TAO_END_VERSIONED_NAMESPACE_DECL
00118 
00119 #if defined (__ACE_INLINE__)
00120 #include "tao/Pluggable_Messaging_Utils.inl"
00121 #endif /* __ACE_INLINE__ */
00122 
00123 #include /**/ "ace/post.h"
00124 
00125 #endif /* TAO_PLUGGABLE_MESSAGING_UTILS_H */

Generated on Tue Feb 2 17:37:52 2010 for TAO by  doxygen 1.4.7