DIOP_Transport.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file   DIOP_Transport.h
00006  *
00007  *  DIOP_Transport.h,v 1.17 2006/04/19 11:38:50 jwillemsen Exp
00008  *
00009  *  @author  Michael Kircher
00010  */
00011 //=============================================================================
00012 
00013 #ifndef TAO_DIOP_TRANSPORT_H
00014 #define TAO_DIOP_TRANSPORT_H
00015 
00016 #include /**/ "ace/pre.h"
00017 
00018 #include "tao/orbconf.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 #if defined (TAO_HAS_DIOP) && (TAO_HAS_DIOP != 0)
00025 
00026 #include "tao/Strategies/strategies_export.h"
00027 #include "tao/Transport.h"
00028 #include "ace/SOCK_Stream.h"
00029 #include "ace/Svc_Handler.h"
00030 
00031 #if defined ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_EXPORT
00032 template class TAO_Strategies_Export ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>;
00033 #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_EXPORT */
00034 
00035 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00036 
00037 // Forward decls.
00038 class TAO_DIOP_Connection_Handler;
00039 class TAO_ORB_Core;
00040 class TAO_Operation_Details;
00041 class TAO_Pluggable_Messaging;
00042 class TAO_Acceptor;
00043 
00044 // Service Handler for this transport
00045 typedef ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>
00046         TAO_DIOP_SVC_HANDLER;
00047 
00048 /**
00049  * @class TAO_DIOP_Transport
00050  *
00051  * @brief Specialization of the base TAO_Transport class to handle the
00052  *  DIOP protocol.
00053  */
00054 class TAO_Strategies_Export TAO_DIOP_Transport : public TAO_Transport
00055 {
00056 public:
00057 
00058   /// Constructor.
00059   TAO_DIOP_Transport (TAO_DIOP_Connection_Handler *handler,
00060                       TAO_ORB_Core *orb_core,
00061                       CORBA::Boolean flag);
00062 
00063   /// Default destructor.
00064   ~TAO_DIOP_Transport (void);
00065 
00066   /// Look for the documentation in Transport.h.
00067   virtual int handle_input (TAO_Resume_Handle &rh,
00068                             ACE_Time_Value *max_wait_time = 0,
00069                             int block = 0);
00070 protected:
00071   /** @name Overridden Template Methods
00072    *
00073    * These are implementations of template methods declared by TAO_Transport.
00074    */
00075   //@{
00076 
00077   virtual ACE_Event_Handler * event_handler_i (void);
00078   virtual TAO_Connection_Handler *connection_handler_i (void);
00079   virtual TAO_Pluggable_Messaging *messaging_object (void);
00080 
00081   /// Write the complete Message_Block chain to the connection.
00082   virtual ssize_t send (iovec *iov, int iovcnt,
00083                         size_t &bytes_transferred,
00084                         const ACE_Time_Value *max_wait_time);
00085 
00086   /// Read len bytes from into buf.
00087   virtual ssize_t recv (char *buf,
00088                         size_t len,
00089                         const ACE_Time_Value *s = 0);
00090 
00091   virtual int send_message_shared (TAO_Stub *stub,
00092                                    int message_semantics,
00093                                    const ACE_Message_Block *message_block,
00094                                    ACE_Time_Value *max_wait_time);
00095 
00096   virtual int register_handler (void);
00097 
00098   ///@}
00099 public:
00100   /// @todo These methods IMHO should have more meaningful names.
00101   /// The names seem to indicate nothing.
00102   virtual int send_request (TAO_Stub *stub,
00103                             TAO_ORB_Core *orb_core,
00104                             TAO_OutputCDR &stream,
00105                             int message_semantics,
00106                             ACE_Time_Value *max_wait_time);
00107 
00108   virtual int send_message (TAO_OutputCDR &stream,
00109                             TAO_Stub *stub = 0,
00110                             int message_semantics = TAO_Transport::TAO_TWOWAY_REQUEST,
00111                             ACE_Time_Value *max_time_wait = 0);
00112 
00113   /// Initialising the messaging object
00114   virtual int messaging_init (CORBA::Octet major,
00115                               CORBA::Octet minor);
00116 
00117 private:
00118   // @@ Frank : Not needed
00119   /*
00120   /// Set the Bidirectional context info in the service context list
00121   void set_bidir_context_info (TAO_Operation_Details &opdetails);
00122 
00123   /// Add the listen points in <acceptor> to the <listen_point_list>
00124   /// if this connection is in the same interface as that of the
00125   /// endpoints in the <acceptor>
00126   int get_listen_point (DIOP::ListenPointList &listen_point_list,
00127                         TAO_Acceptor *acceptor);
00128   */
00129 private:
00130 
00131   /// The connection service handler used for accessing lower layer
00132   /// communication protocols.
00133   TAO_DIOP_Connection_Handler *connection_handler_;
00134 
00135   /// Our messaging object.
00136   TAO_Pluggable_Messaging *messaging_object_;
00137 };
00138 
00139 TAO_END_VERSIONED_NAMESPACE_DECL
00140 
00141 #endif /* TAO_HAS_DIOP && TAO_HAS_DIOP != 0 */
00142 
00143 #include /**/ "ace/post.h"
00144 
00145 #endif  /* TAO_DIOP_TRANSPORT_H */

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