IIOP_Transport.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 // ===================================================================
00004 /**
00005  *  @file   IIOP_Transport.h
00006  *
00007  *  $Id: IIOP_Transport.h 80603 2008-02-11 22:14:39Z johnc $
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_Acceptor;
00041 class TAO_Adapter;
00042 
00043 /**
00044  * @class TAO_IIOP_Transport
00045  *
00046  * @brief Specialization of the base TAO_Transport class to handle the
00047  *  IIOP protocol.
00048  *
00049  * Specialization of the base TAO_Transport class to handle the IIOP
00050  * protocol.
00051  */
00052 class TAO_Export TAO_IIOP_Transport : public TAO_Transport
00053 {
00054 public:
00055 
00056   /// Constructor.
00057   TAO_IIOP_Transport (TAO_IIOP_Connection_Handler *handler,
00058                       TAO_ORB_Core *orb_core);
00059 
00060 protected:
00061 
00062   /// Destructor
00063   /**
00064    * Protected destructor to enforce proper memory management through
00065    * the reference counting mechanism.
00066    */
00067   virtual ~TAO_IIOP_Transport (void);
00068 
00069   /** @name Overridden Template Methods
00070    *
00071    * Please check the documentation in "tao/Transport.h" for more
00072    * details.
00073    */
00074   //@{
00075 
00076   virtual ACE_Event_Handler * event_handler_i (void);
00077 
00078   virtual ssize_t send (iovec *iov, int iovcnt,
00079                         size_t &bytes_transferred,
00080                         const ACE_Time_Value *timeout = 0);
00081 
00082 #if TAO_HAS_SENDFILE == 1
00083   virtual ssize_t sendfile (TAO_MMAP_Allocator * allocator,
00084                             iovec * iov,
00085                             int iovcnt,
00086                             size_t &bytes_transferred,
00087                             ACE_Time_Value const * timeout = 0);
00088 #endif  /* TAO_HAS_SENDFILE==1 */
00089 
00090 
00091   virtual ssize_t recv (char *buf, size_t len, const ACE_Time_Value *s = 0);
00092 
00093 
00094 public:
00095 
00096   /// Bridge method to call a similar method on the connection handler
00097   void update_protocol_properties (int send_buffer_size,
00098                                    int recv_buffer_size,
00099                                    int no_delay,
00100                                    int enable_network_priority);
00101 
00102   /// @todo These methods IMHO should have more meaningful
00103   /// names. The names seem to indicate nothing.
00104   virtual int send_request (TAO_Stub *stub,
00105                             TAO_ORB_Core *orb_core,
00106                             TAO_OutputCDR &stream,
00107                             TAO_Message_Semantics message_semantics,
00108                             ACE_Time_Value *max_wait_time);
00109 
00110   virtual int send_message (TAO_OutputCDR &stream,
00111                             TAO_Stub *stub = 0,
00112                             TAO_Message_Semantics message_semantics = TAO_Transport::TAO_TWOWAY_REQUEST,
00113                             ACE_Time_Value *max_time_wait = 0);
00114 
00115   virtual int generate_request_header (TAO_Operation_Details &opdetails,
00116                                        TAO_Target_Specification &spec,
00117                                        TAO_OutputCDR &msg);
00118 
00119   virtual int tear_listen_point_list (TAO_InputCDR &cdr);
00120 
00121   virtual TAO_Connection_Handler * connection_handler_i (void);
00122 
00123   //@}
00124 
00125 private:
00126 
00127   /// Set the Bidirectional context info in the service context list
00128   void set_bidir_context_info (TAO_Operation_Details &opdetails);
00129 
00130   /// Add the listen points in @a acceptor to the @a listen_point_list
00131   /// if this connection is in the same interface as that of the
00132   /// endpoints in the @a acceptor
00133   int get_listen_point (IIOP::ListenPointList &listen_point_list,
00134                         TAO_Acceptor *acceptor);
00135 private:
00136 
00137   /// The connection service handler used for accessing lower layer
00138   /// communication protocols.
00139   TAO_IIOP_Connection_Handler *connection_handler_;
00140 };
00141 
00142 TAO_END_VERSIONED_NAMESPACE_DECL
00143 
00144 #endif /* TAO_HAS_IIOP && TAO_HAS_IIOP != 0 */
00145 
00146 #include /**/ "ace/post.h"
00147 
00148 #endif  /* TAO_IIOP_TRANSPORT_H */

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