Remote_Invocation.h

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

Generated on Sun Jan 27 13:07:36 2008 for TAO by doxygen 1.3.6