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 78931 2007-07-18 09:59:36Z johnnyw $
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 
00061 protected:
00062 
00063   /// Destructor
00064   /**
00065    * Protected destructor to enforce proper memory management through
00066    * the reference counting mechanism.
00067    */
00068   virtual ~TAO_IIOP_Transport (void);
00069 
00070   /** @name Overridden Template Methods
00071    *
00072    * Please check the documentation in "tao/Transport.h" for more
00073    * details.
00074    */
00075   //@{
00076 
00077   virtual ACE_Event_Handler * event_handler_i (void);
00078 
00079   /// Access the underlying messaging object
00080   virtual TAO_Pluggable_Messaging *messaging_object (void);
00081 
00082   virtual ssize_t send (iovec *iov, int iovcnt,
00083                         size_t &bytes_transferred,
00084                         const ACE_Time_Value *timeout = 0);
00085 
00086 #if TAO_HAS_SENDFILE == 1
00087   virtual ssize_t sendfile (TAO_MMAP_Allocator * allocator,
00088                             iovec * iov,
00089                             int iovcnt,
00090                             size_t &bytes_transferred,
00091                             ACE_Time_Value const * timeout = 0);
00092 #endif  /* TAO_HAS_SENDFILE==1 */
00093 
00094 
00095   virtual ssize_t recv (char *buf, size_t len, const ACE_Time_Value *s = 0);
00096 
00097   virtual int send_message_shared (TAO_Stub *stub,
00098                                    int message_semantics,
00099                                    const ACE_Message_Block *message_block,
00100                                    ACE_Time_Value *max_wait_time);
00101 
00102 
00103 public:
00104 
00105   /// Bridge method to call a similar method on the connection handler
00106   void update_protocol_properties (int send_buffer_size,
00107                                    int recv_buffer_size,
00108                                    int no_delay,
00109                                    int enable_network_priority);
00110 
00111   /// @todo These methods IMHO should have more meaningful
00112   /// names. The names seem to indicate nothing.
00113   virtual int send_request (TAO_Stub *stub,
00114                             TAO_ORB_Core *orb_core,
00115                             TAO_OutputCDR &stream,
00116                             int message_semantics,
00117                             ACE_Time_Value *max_wait_time);
00118 
00119   virtual int send_message (TAO_OutputCDR &stream,
00120                             TAO_Stub *stub = 0,
00121                             int message_semantics = TAO_Transport::TAO_TWOWAY_REQUEST,
00122                             ACE_Time_Value *max_time_wait = 0);
00123 
00124   virtual int generate_request_header (TAO_Operation_Details &opdetails,
00125                                        TAO_Target_Specification &spec,
00126                                        TAO_OutputCDR &msg);
00127 
00128   virtual int messaging_init (CORBA::Octet major, CORBA::Octet minor);
00129 
00130   virtual int tear_listen_point_list (TAO_InputCDR &cdr);
00131 
00132   virtual TAO_Connection_Handler * connection_handler_i (void);
00133 
00134   //@}
00135 
00136 private:
00137 
00138   /// Set the Bidirectional context info in the service context list
00139   void set_bidir_context_info (TAO_Operation_Details &opdetails);
00140 
00141   /// Add the listen points in @a acceptor to the @a listen_point_list
00142   /// if this connection is in the same interface as that of the
00143   /// endpoints in the @a acceptor
00144   int get_listen_point (IIOP::ListenPointList &listen_point_list,
00145                         TAO_Acceptor *acceptor);
00146 private:
00147 
00148   /// The connection service handler used for accessing lower layer
00149   /// communication protocols.
00150   TAO_IIOP_Connection_Handler *connection_handler_;
00151 
00152   /// Our messaging object.
00153   TAO_Pluggable_Messaging *messaging_object_;
00154 };
00155 
00156 TAO_END_VERSIONED_NAMESPACE_DECL
00157 
00158 #endif /* TAO_HAS_IIOP && TAO_HAS_IIOP != 0 */
00159 
00160 #include /**/ "ace/post.h"
00161 
00162 #endif  /* TAO_IIOP_TRANSPORT_H */

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