IIOP_Transport.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 // ===================================================================
00004 /**
00005  *  @file   IIOP_Transport.h
00006  *
00007  *  IIOP_Transport.h,v 1.68 2006/06/20 06:03:47 jwillemsen Exp
00008  *
00009  *  @author Originally by Fred Kuhns <fredk@cs.wustl.edu>
00010  *  @author Modified by Balachandran Natarajan <bala@cs.wustl.edu>
00011  */
00012 // ===================================================================
00013 
00014 #ifndef TAO_IIOP_TRANSPORT_H
00015 #define TAO_IIOP_TRANSPORT_H
00016 
00017 #include /**/ "ace/pre.h"
00018 
00019 #include "tao/orbconf.h"
00020 
00021 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00022 # pragma once
00023 #endif /* ACE_LACKS_PRAGMA_ONCE */
00024 
00025 #if defined (TAO_HAS_IIOP) && (TAO_HAS_IIOP != 0)
00026 
00027 #include "tao/Transport.h"
00028 
00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00030 
00031 namespace IIOP
00032 {
00033   class ListenPointList;
00034 }
00035 
00036 // Forward decls.
00037 class TAO_IIOP_Connection_Handler;
00038 class TAO_ORB_Core;
00039 class TAO_Operation_Details;
00040 class TAO_Pluggable_Messaging;
00041 class TAO_Acceptor;
00042 class TAO_Adapter;
00043 
00044 /**
00045  * @class TAO_IIOP_Transport
00046  *
00047  * @brief Specialization of the base TAO_Transport class to handle the
00048  *  IIOP protocol.
00049  *
00050  * Specialization of the base TAO_Transport class to handle the IIOP
00051  * protocol.
00052  */
00053 class TAO_Export TAO_IIOP_Transport : public TAO_Transport
00054 {
00055 public:
00056 
00057   /// Constructor.
00058   TAO_IIOP_Transport (TAO_IIOP_Connection_Handler *handler,
00059                       TAO_ORB_Core *orb_core,
00060                       CORBA::Boolean flag);
00061 
00062 protected:
00063 
00064   /// Destructor
00065   /**
00066    * Protected destructor to enforce proper memory management through
00067    * the reference counting mechanism.
00068    */
00069   virtual ~TAO_IIOP_Transport (void);
00070 
00071   /** @name Overridden Template Methods
00072    *
00073    * Please check the documentation in "tao/Transport.h" for more
00074    * details.
00075    */
00076   //@{
00077 
00078   virtual ACE_Event_Handler * event_handler_i (void);
00079 
00080   /// Access the underlying messaging object
00081   virtual TAO_Pluggable_Messaging *messaging_object (void);
00082 
00083   virtual ssize_t send (iovec *iov, int iovcnt,
00084                         size_t &bytes_transferred,
00085                         const ACE_Time_Value *timeout = 0);
00086 
00087 #ifdef ACE_HAS_SENDFILE
00088   virtual ssize_t sendfile (TAO_MMAP_Allocator * allocator,
00089                             iovec * iov,
00090                             int iovcnt,
00091                             size_t &bytes_transferred,
00092                             ACE_Time_Value const * timeout = 0);
00093 #endif  /* ACE_HAS_SENDFILE */
00094 
00095 
00096   virtual ssize_t recv (char *buf,
00097                         size_t len,
00098                         const ACE_Time_Value *s = 0);
00099 
00100   virtual int send_message_shared (TAO_Stub *stub,
00101                                    int message_semantics,
00102                                    const ACE_Message_Block *message_block,
00103                                    ACE_Time_Value *max_wait_time);
00104 
00105 
00106 public:
00107 
00108   /// Bridge method to call a similar method on the connection handler
00109   void update_protocol_properties (int send_buffer_size,
00110                                    int recv_buffer_size,
00111                                    int no_delay,
00112                                    int enable_network_priority);
00113 
00114   /// @todo These methods IMHO should have more meaningful
00115   /// names. The names seem to indicate nothing.
00116   virtual int send_request (TAO_Stub *stub,
00117                             TAO_ORB_Core *orb_core,
00118                             TAO_OutputCDR &stream,
00119                             int message_semantics,
00120                             ACE_Time_Value *max_wait_time);
00121 
00122   virtual int send_message (TAO_OutputCDR &stream,
00123                             TAO_Stub *stub = 0,
00124                             int message_semantics = TAO_Transport::TAO_TWOWAY_REQUEST,
00125                             ACE_Time_Value *max_time_wait = 0);
00126 
00127   virtual int generate_request_header (TAO_Operation_Details &opdetails,
00128                                        TAO_Target_Specification &spec,
00129                                        TAO_OutputCDR &msg);
00130 
00131   virtual int messaging_init (CORBA::Octet major,
00132                               CORBA::Octet minor);
00133 
00134   virtual int tear_listen_point_list (TAO_InputCDR &cdr);
00135 
00136   virtual TAO_Connection_Handler * connection_handler_i (void);
00137 
00138   //@}
00139 
00140 private:
00141 
00142   /// Set the Bidirectional context info in the service context list
00143   void set_bidir_context_info (TAO_Operation_Details &opdetails);
00144 
00145   /// Add the listen points in @a acceptor to the @a listen_point_list
00146   /// if this connection is in the same interface as that of the
00147   /// endpoints in the @a acceptor
00148   int get_listen_point (IIOP::ListenPointList &listen_point_list,
00149                         TAO_Acceptor *acceptor);
00150 private:
00151 
00152   /// The connection service handler used for accessing lower layer
00153   /// communication protocols.
00154   TAO_IIOP_Connection_Handler *connection_handler_;
00155 
00156   /// Our messaging object.
00157   TAO_Pluggable_Messaging *messaging_object_;
00158 };
00159 
00160 TAO_END_VERSIONED_NAMESPACE_DECL
00161 
00162 #endif /* TAO_HAS_IIOP && TAO_HAS_IIOP != 0 */
00163 
00164 #include /**/ "ace/post.h"
00165 
00166 #endif  /* TAO_IIOP_TRANSPORT_H */

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