Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

GIOP_Message_Generator_Parser.h

Go to the documentation of this file.
00001 
00002 // -*- C++ -*-
00003 // ===================================================================
00004 /**
00005  *  @file   GIOP_Message_Generator_Parser.h
00006  *
00007  *  $Id: GIOP_Message_Generator_Parser.h,v 1.1.1.2 2003/02/21 18:36:45 chad 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 #include "ace/pre.h"
00016 
00017 #include "tao/corbafwd.h"
00018 
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 # pragma once
00021 #endif /* ACE_LACKS_PRAGMA_ONCE */
00022 
00023 #include "tao/Exception.h"
00024 
00025 class TAO_Operation_Details;
00026 class TAO_Target_Specification;
00027 class TAO_OutputCDR;
00028 class TAO_InputCDR;
00029 class TAO_Pluggable_Reply_Params;
00030 class TAO_Pluggable_Reply_Params_Base;
00031 class TAO_GIOP_Locate_Status_Msg;
00032 class TAO_GIOP_Locate_Request_Header;
00033 
00034 /**
00035  * @class TAO_GIOP_Message_Generator_Parser
00036  *
00037  * @brief Base class for the GIOP Message generator and parser
00038  *
00039  * Version specific classes would inherit from this class. Strategy to
00040  * determine which version of the GIOP request have we received and
00041  * which version do we need to use to send messages.
00042  */
00043 
00044 class TAO_Export TAO_GIOP_Message_Generator_Parser
00045 {
00046 public:
00047 
00048   /// Write the request header in to <msg>
00049   virtual int write_request_header (
00050       const TAO_Operation_Details &opdetails,
00051       TAO_Target_Specification &spec,
00052       TAO_OutputCDR &msg) = 0;
00053 
00054   /// Write the LocateRequest header
00055   virtual int write_locate_request_header (
00056       CORBA::ULong request_id,
00057       TAO_Target_Specification &spec,
00058       TAO_OutputCDR &msg) = 0;
00059 
00060   /// Write the reply header in to <output>
00061   virtual int write_reply_header (
00062       TAO_OutputCDR &output,
00063       TAO_Pluggable_Reply_Params_Base &reply
00064       ACE_ENV_ARG_DECL)
00065     ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
00066 
00067   /// Writes the locate _reply message in to the <output>
00068   virtual int write_locate_reply_mesg (
00069       TAO_OutputCDR &output,
00070       CORBA::ULong request_id,
00071       TAO_GIOP_Locate_Status_Msg &status) = 0;
00072 
00073   /// Parse the Request Header from the incoming stream. This will do a
00074   /// version specific parsing of the incoming Request header
00075   virtual int parse_request_header (TAO_ServerRequest &) = 0;
00076 
00077   /// Parse the Loacte Request Header from the incoming stream. This will do a
00078   /// version specific parsing of the incoming Request header
00079   virtual int parse_locate_header (
00080       TAO_GIOP_Locate_Request_Header &) = 0;
00081 
00082   /// Parse the reply message
00083   virtual int parse_reply (TAO_InputCDR &input,
00084                            TAO_Pluggable_Reply_Params &params);
00085 
00086   /// Parse the locate reply message from the server
00087   virtual int parse_locate_reply (TAO_InputCDR &input,
00088                                   TAO_Pluggable_Reply_Params &params);
00089 
00090   /// Our versions
00091   virtual CORBA::Octet major_version (void) = 0;
00092   virtual CORBA::Octet minor_version (void) = 0;
00093 
00094   /// Is the messaging object ready for processing BiDirectional
00095   /// request/response?
00096   virtual int is_ready_for_bidirectional (void);
00097 
00098 protected:
00099 
00100   /// Marshall the reply status
00101   void marshal_reply_status (TAO_OutputCDR &output,
00102                              TAO_Pluggable_Reply_Params_Base &reply);
00103 
00104 };
00105 
00106 #if defined (__ACE_INLINE__)
00107 # include "tao/GIOP_Message_Generator_Parser.inl"
00108 #endif /* __ACE_INLINE__ */
00109 
00110 #include "ace/post.h"
00111 #endif /*TAO_GIOP_MESSAGE_GENERATOR_PARSER_H*/

Generated on Mon Jun 16 13:48:24 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002