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  *  $Id: GIOP_Message_Generator_Parser.h 80805 2008-03-03 14:53:30Z johnnyw $
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/Basic_Types.h"
00024 #include "tao/TAO_Export.h"
00025 
00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00027 
00028 class TAO_Operation_Details;
00029 class TAO_Target_Specification;
00030 class TAO_OutputCDR;
00031 class TAO_InputCDR;
00032 class TAO_Pluggable_Reply_Params;
00033 class TAO_Pluggable_Reply_Params_Base;
00034 class TAO_GIOP_Locate_Status_Msg;
00035 class TAO_GIOP_Locate_Request_Header;
00036 class TAO_ServerRequest;
00037 
00038 /**
00039  * @class TAO_GIOP_Message_Generator_Parser
00040  *
00041  * @brief Base class for the GIOP Message generator and parser
00042  *
00043  * Version specific classes would inherit from this class. Strategy to
00044  * determine which version of the GIOP request have we received and
00045  * which version do we need to use to send messages.
00046  */
00047 
00048 class TAO_GIOP_Message_Generator_Parser
00049 {
00050 public:
00051 
00052   virtual ~TAO_GIOP_Message_Generator_Parser (void);
00053 
00054   /// Write the request header in to @a msg
00055   virtual bool write_request_header (
00056       const TAO_Operation_Details &opdetails,
00057       TAO_Target_Specification &spec,
00058       TAO_OutputCDR &msg) = 0;
00059 
00060   /// Write the LocateRequest header
00061   virtual bool write_locate_request_header (
00062       CORBA::ULong request_id,
00063       TAO_Target_Specification &spec,
00064       TAO_OutputCDR &msg) = 0;
00065 
00066   /// Write the reply header in to @a output
00067   virtual bool write_reply_header (
00068       TAO_OutputCDR &output,
00069       TAO_Pluggable_Reply_Params_Base &reply) = 0;
00070 
00071   /// Writes the locate _reply message in to the @a output
00072   virtual bool write_locate_reply_mesg (
00073       TAO_OutputCDR &output,
00074       CORBA::ULong request_id,
00075       TAO_GIOP_Locate_Status_Msg &status) = 0;
00076 
00077   /// Write the GIOP fragment message header to the output CDR stream
00078   /// @a cdr.
00079   virtual bool write_fragment_header (TAO_OutputCDR & cdr,
00080                                       CORBA::ULong request_id) = 0;
00081 
00082   /// Parse the Request Header from the incoming stream. This will do a
00083   /// version specific parsing of the incoming Request header
00084   virtual int parse_request_header (TAO_ServerRequest &) = 0;
00085 
00086   /// Parse the Loacte Request Header from the incoming stream. This will do a
00087   /// version specific parsing of the incoming Request header
00088   virtual int parse_locate_header (TAO_GIOP_Locate_Request_Header &) = 0;
00089 
00090   /// Parse the reply message
00091   virtual int parse_reply (TAO_InputCDR &input,
00092                            TAO_Pluggable_Reply_Params &params);
00093 
00094   /// Parse the locate reply message from the server
00095   virtual int parse_locate_reply (TAO_InputCDR &input,
00096                                   TAO_Pluggable_Reply_Params &params);
00097 
00098   /// Our versions
00099   virtual CORBA::Octet major_version (void) const = 0;
00100   virtual CORBA::Octet minor_version (void) const = 0;
00101 
00102   /// Is the messaging object ready for processing BiDirectional
00103   /// request/response?
00104   virtual bool is_ready_for_bidirectional (void) const;
00105 
00106   /// The header length of a fragment
00107   virtual size_t fragment_header_length (void) const = 0;
00108 };
00109 
00110 TAO_END_VERSIONED_NAMESPACE_DECL
00111 
00112 #include /**/ "ace/post.h"
00113 
00114 #endif /*TAO_GIOP_MESSAGE_GENERATOR_PARSER_H*/

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