SCIOP_Transport.h

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

Generated on Tue Feb 2 17:47:18 2010 for TAO_Strategies by  doxygen 1.4.7