SCIOP_Transport.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 // SCIOP_Transport.h,v 1.11 2006/04/19 11:38:50 jwillemsen Exp
00004 // ===================================================================
00005 /**
00006  *  @file   SCIOP_Transport.h
00007  *
00008  *  @author  Jason Cohen, Lockheed Martin ATL  <jcohen@atl.lmco.com>
00009  *  @author  Keith O'Hara, Lockheed Martin ATL
00010  */
00011 // ===================================================================
00012 
00013 #ifndef TAO_SCIOP_TRANSPORT_H
00014 #define TAO_SCIOP_TRANSPORT_H
00015 #include /**/ "ace/pre.h"
00016 
00017 #include "tao/orbconf.h"
00018 
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 # pragma once
00021 #endif /* ACE_LACKS_PRAGMA_ONCE */
00022 
00023 #if TAO_HAS_SCIOP == 1
00024 
00025 #include "tao/Strategies/strategies_export.h"
00026 #include "tao/Transport.h"
00027 #include "tao/IIOPC.h"
00028 #include "ace/SOCK_SEQPACK_Association.h"
00029 
00030 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00031 
00032 // Forward decls.
00033 class TAO_SCIOP_Connection_Handler;
00034 class TAO_ORB_Core;
00035 class TAO_Operation_Details;
00036 class TAO_Pluggable_Messaging;
00037 class TAO_Acceptor;
00038 
00039 /**
00040  * @class TAO_SCIOP_Transport
00041  *
00042  * @brief Specialization of the base TAO_Transport class to handle the
00043  *  SCIOP protocol.
00044  *
00045  * Specialization of the base TAO_Transport class to handle the SCIOP
00046  * protocol.
00047  */
00048 class TAO_Strategies_Export TAO_SCIOP_Transport : public TAO_Transport
00049 {
00050 public:
00051 
00052   /// Constructor.
00053   TAO_SCIOP_Transport (TAO_SCIOP_Connection_Handler *handler,
00054                       TAO_ORB_Core *orb_core,
00055                       CORBA::Boolean flag);
00056 
00057 protected:
00058 
00059   /// Destructor
00060   /**
00061    * Protected destructor to enforce proper memory management through
00062    * the reference counting mechanism.
00063    */
00064   virtual ~TAO_SCIOP_Transport (void);
00065 
00066   /** @name Overridden Template Methods
00067    *
00068    * Please check the documentation in "tao/Transport.h" for more
00069    * details.
00070    */
00071   //@{
00072 
00073   virtual ACE_Event_Handler * event_handler_i (void);
00074 
00075   /// Access the underlying messaging object
00076   virtual TAO_Pluggable_Messaging *messaging_object (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   virtual ssize_t recv (char *buf,
00083                         size_t len,
00084                         const ACE_Time_Value *s = 0);
00085 
00086   virtual int send_message_shared (TAO_Stub *stub,
00087                                    int message_semantics,
00088                                    const ACE_Message_Block *message_block,
00089                                    ACE_Time_Value *max_wait_time);
00090 
00091 
00092 public:
00093   /// @todo These methods IMHO should have more meaningful
00094   /// names. The names seem to indicate nothing.
00095   virtual int send_request (TAO_Stub *stub,
00096                             TAO_ORB_Core *orb_core,
00097                             TAO_OutputCDR &association,
00098                             int message_semantics,
00099                             ACE_Time_Value *max_wait_time);
00100 
00101   virtual int send_message (TAO_OutputCDR &association,
00102                             TAO_Stub *stub = 0,
00103                             int message_semantics = TAO_Transport::TAO_TWOWAY_REQUEST,
00104                             ACE_Time_Value *max_time_wait = 0);
00105 
00106   /*virtual int send_reply (TAO_OutputCDR &stream,
00107                           TAO_Adapter *poa = 0);*/
00108 
00109   virtual int generate_request_header (TAO_Operation_Details &opdetails,
00110                                        TAO_Target_Specification &spec,
00111                                        TAO_OutputCDR &msg);
00112 
00113   virtual int messaging_init (CORBA::Octet major,
00114                               CORBA::Octet minor);
00115 
00116   virtual int tear_listen_point_list (TAO_InputCDR &cdr);
00117 
00118   virtual TAO_Connection_Handler * connection_handler_i (void);
00119 
00120   //@}
00121 
00122 private:
00123 
00124   /// Set the Bidirectional context info in the service context list
00125   void set_bidir_context_info (TAO_Operation_Details &opdetails);
00126 
00127   /// Add the listen points in <acceptor> to the <listen_point_list>
00128   /// if this connection is in the same interface as that of the
00129   /// endpoints in the <acceptor>
00130   int get_listen_point (IIOP::ListenPointList &listen_point_list,
00131                         TAO_Acceptor *acceptor);
00132 private:
00133 
00134   /// The connection service handler used for accessing lower layer
00135   /// communication protocols.
00136   TAO_SCIOP_Connection_Handler *connection_handler_;
00137 
00138   /// Our messaging object.
00139   TAO_Pluggable_Messaging *messaging_object_;
00140 };
00141 
00142 TAO_END_VERSIONED_NAMESPACE_DECL
00143 
00144 #endif /* TAO_HAS_SCIOP == 1 */
00145 
00146 #include /**/ "ace/post.h"
00147 
00148 #endif  /* TAO_SCIOP_TRANSPORT_H */

Generated on Thu Nov 9 13:39:29 2006 for TAO_Strategies by doxygen 1.3.6