GIOP_Message_Generator_Parser.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 // ===================================================================
00004 /**
00005  *  @file   GIOP_Message_Generator_Parser.h
00006  *
00007  *  GIOP_Message_Generator_Parser.h,v 1.22 2006/04/20 12:37:17 jwillemsen Exp
00008  *
00009  *  @author Balachandran Natarajan <bala@cs.wustl.edu>
00010  */
00011 // ===================================================================
00012 
00013 #ifndef TAO_GIOP_MESSAGE_GENERATOR_PARSER_H
00014 #define TAO_GIOP_MESSAGE_GENERATOR_PARSER_H
00015 
00016 #include /**/ "ace/pre.h"
00017 #include "ace/Global_Macros.h"
00018 
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 # pragma once
00021 #endif /* ACE_LACKS_PRAGMA_ONCE */
00022 
00023 #include "tao/SystemException.h"
00024 
00025 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00026 
00027 class TAO_Operation_Details;
00028 class TAO_Target_Specification;
00029 class TAO_OutputCDR;
00030 class TAO_InputCDR;
00031 class TAO_Pluggable_Reply_Params;
00032 class TAO_Pluggable_Reply_Params_Base;
00033 class TAO_GIOP_Locate_Status_Msg;
00034 class TAO_GIOP_Locate_Request_Header;
00035 class TAO_ServerRequest;
00036 
00037 /**
00038  * @class TAO_GIOP_Message_Generator_Parser
00039  *
00040  * @brief Base class for the GIOP Message generator and parser
00041  *
00042  * Version specific classes would inherit from this class. Strategy to
00043  * determine which version of the GIOP request have we received and
00044  * which version do we need to use to send messages.
00045  */
00046 
00047 class TAO_Export TAO_GIOP_Message_Generator_Parser
00048 {
00049 public:
00050 
00051   virtual ~TAO_GIOP_Message_Generator_Parser (void);
00052 
00053   /// Write the request header in to @a msg
00054   virtual int write_request_header (
00055       const TAO_Operation_Details &opdetails,
00056       TAO_Target_Specification &spec,
00057       TAO_OutputCDR &msg) = 0;
00058 
00059   /// Write the LocateRequest header
00060   virtual int write_locate_request_header (
00061       CORBA::ULong request_id,
00062       TAO_Target_Specification &spec,
00063       TAO_OutputCDR &msg) = 0;
00064 
00065   /// Write the reply header in to @a output
00066   virtual int write_reply_header (
00067       TAO_OutputCDR &output,
00068       TAO_Pluggable_Reply_Params_Base &reply
00069       ACE_ENV_ARG_DECL)
00070     ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
00071 
00072   /// Writes the locate _reply message in to the @a output
00073   virtual int write_locate_reply_mesg (
00074       TAO_OutputCDR &output,
00075       CORBA::ULong request_id,
00076       TAO_GIOP_Locate_Status_Msg &status) = 0;
00077 
00078   /// Write the GIOP fragment message header to the output CDR stream
00079   /// @a cdr.
00080   virtual bool write_fragment_header (TAO_OutputCDR & cdr,
00081                                       CORBA::ULong request_id) = 0;
00082 
00083   /// Parse the Request Header from the incoming stream. This will do a
00084   /// version specific parsing of the incoming Request header
00085   virtual int parse_request_header (TAO_ServerRequest &) = 0;
00086 
00087   /// Parse the Loacte Request Header from the incoming stream. This will do a
00088   /// version specific parsing of the incoming Request header
00089   virtual int parse_locate_header (
00090       TAO_GIOP_Locate_Request_Header &) = 0;
00091 
00092   /// Parse the reply message
00093   virtual int parse_reply (TAO_InputCDR &input,
00094                            TAO_Pluggable_Reply_Params &params);
00095 
00096   /// Parse the locate reply message from the server
00097   virtual int parse_locate_reply (TAO_InputCDR &input,
00098                                   TAO_Pluggable_Reply_Params &params);
00099 
00100   /// Our versions
00101   virtual CORBA::Octet major_version (void) = 0;
00102   virtual CORBA::Octet minor_version (void) = 0;
00103 
00104   /// Is the messaging object ready for processing BiDirectional
00105   /// request/response?
00106   virtual int is_ready_for_bidirectional (void);
00107 
00108   /// The header length of a fragment
00109   virtual size_t fragment_header_length (void) const = 0;
00110 
00111 protected:
00112 
00113   /// Marshall the reply status
00114   void marshal_reply_status (TAO_OutputCDR &output,
00115                              TAO_Pluggable_Reply_Params_Base &reply);
00116 
00117 };
00118 
00119 TAO_END_VERSIONED_NAMESPACE_DECL
00120 
00121 #include /**/ "ace/post.h"
00122 
00123 #endif /*TAO_GIOP_MESSAGE_GENERATOR_PARSER_H*/

Generated on Thu Nov 9 11:54:12 2006 for TAO by doxygen 1.3.6