Remote_Invocation.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Remote_Invocation.h
00006  *
00007  *  Remote_Invocation.h,v 1.5 2005/11/02 11:03:26 ossama Exp
00008  *
00009  *
00010  *  @author Balachandran Natarajan <bala@dre.vanderbilt.edu>
00011  */
00012 //=============================================================================
00013 
00014 #ifndef TAO_REMOTE_INVOCATION_H
00015 #define TAO_REMOTE_INVOCATION_H
00016 
00017 #include /**/ "ace/pre.h"
00018 #include "ace/CORBA_macros.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #include "tao/Invocation_Base.h"
00025 
00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00027 
00028 class TAO_Operation_Details;
00029 class TAO_Target_Specification;
00030 class TAO_OutputCDR;
00031 
00032 namespace CORBA
00033 {
00034   class Environment;
00035 }
00036 
00037 namespace TAO
00038 {
00039   class Profile_Transport_Resolver;
00040   class Argument;
00041 
00042   /**
00043    * @class Remote_Invocation
00044    *
00045    * @brief Base class for remote invocations.
00046    *
00047    * This class encapulates some of the common functionalities used by
00048    * synchronous, asynchronous, DII and DSI invocations.
00049    *
00050    */
00051   class TAO_Export Remote_Invocation : public Invocation_Base
00052   {
00053   public:
00054     /**
00055      * @param otarget The original target on which this invocation
00056      * was started. This is there to be passed up to its parent
00057      * class.
00058      *
00059      * @param resolver The profile and transport holder.
00060      *
00061      * @param detail Pperation details of the invocation on the target
00062      *
00063      * @param response_expected Flag to indicate whether the
00064      * operation encapsulated by @a op returns a response or not.
00065      */
00066     Remote_Invocation (CORBA::Object_ptr otarget,
00067                        Profile_Transport_Resolver &resolver,
00068                        TAO_Operation_Details &detail,
00069                        bool response_expected);
00070 
00071   protected:
00072 
00073     /// Initialize the @a spec.
00074     void init_target_spec (TAO_Target_Specification &spec
00075                            ACE_ENV_ARG_DECL);
00076 
00077     /// Write the GIOP header into the stream.
00078     void write_header (TAO_Target_Specification &spec,
00079                        TAO_OutputCDR &out_stream
00080                        ACE_ENV_ARG_DECL);
00081 
00082     /// Marshal the arguments into the stream.
00083     void marshal_data (TAO_OutputCDR &cdr
00084                        ACE_ENV_ARG_DECL);
00085 
00086     /// Write the message onto the socket
00087     Invocation_Status send_message (TAO_OutputCDR &cdr,
00088                                     short message_semantics,
00089                                     ACE_Time_Value *max_wait_time
00090                                     ACE_ENV_ARG_DECL);
00091 
00092   protected:
00093     /// Our resolver
00094     Profile_Transport_Resolver &resolver_;
00095   };
00096 }
00097 
00098 TAO_END_VERSIONED_NAMESPACE_DECL
00099 
00100 #include /**/ "ace/post.h"
00101 
00102 #endif /*TAO_REMOTE_INVOCATION_H*/

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