UIOP_Transport.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 // ===================================================================
00004 /**
00005  *  @file   UIOP_Transport.h
00006  *
00007  *  UIOP_Transport.h,v 1.23 2006/03/10 07:19:19 jtc Exp
00008  *
00009  *  @author Originally by Fred Kuhns <fredk@cs.wustl.edu>
00010  *  @author Ossama Othman <ossama@ece.uci.edu>
00011  *  @author Modified by Balachandran Natarajan <bala@cs.wustl.edu>
00012  */
00013 // ===================================================================
00014 
00015 #ifndef TAO_UIOP_TRANSPORT_H
00016 #define TAO_UIOP_TRANSPORT_H
00017 
00018 #include /**/ "ace/pre.h"
00019 
00020 #include "tao/orbconf.h"
00021 
00022 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00023 # pragma once
00024 #endif /* ACE_LACKS_PRAGMA_ONCE */
00025 
00026 # if TAO_HAS_UIOP == 1
00027 
00028 #include "tao/Strategies/strategies_export.h"
00029 #include "ace/LSOCK_Acceptor.h"
00030 #include "ace/Svc_Handler.h"
00031 #include "tao/Transport.h"
00032 
00033 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00034 
00035 // Forward decls.
00036 
00037 class TAO_ORB_Core;
00038 class TAO_UIOP_Connection_Handler;
00039 class TAO_Pluggable_Messaging;
00040 
00041 typedef ACE_Svc_Handler<ACE_LSOCK_STREAM, ACE_NULL_SYNCH>
00042         TAO_UIOP_SVC_HANDLER;
00043 
00044 /**
00045  * @class TAO_UIOP_Transport
00046  *
00047  * @brief Specialization of the base TAO_Transport class to handle the
00048  *  UIOP protocol.
00049  *
00050  */
00051 
00052 class TAO_Strategies_Export TAO_UIOP_Transport : public TAO_Transport
00053 {
00054 public:
00055 
00056   /// Constructor.
00057   TAO_UIOP_Transport (TAO_UIOP_Connection_Handler *handler,
00058                       TAO_ORB_Core *orb_core,
00059                       CORBA::Boolean flag);
00060 
00061   /// Default destructor.
00062   ~TAO_UIOP_Transport (void);
00063 
00064 protected:
00065   /** @name Overridden Template Methods
00066    *
00067    * These are implementations of template methods declared by TAO_Transport.
00068    */
00069   //@{
00070 
00071   virtual ACE_Event_Handler * event_handler_i (void);
00072   virtual TAO_Connection_Handler *connection_handler_i (void);
00073   virtual TAO_Pluggable_Messaging *messaging_object (void);
00074 
00075   /// Write the complete Message_Block chain to the connection.
00076   virtual ssize_t send (iovec *iov, int iovcnt,
00077                         size_t &bytes_transferred,
00078                         const ACE_Time_Value *timeout = 0);
00079 
00080   /// Read len bytes from into buf.
00081   virtual ssize_t recv (char *buf,
00082                         size_t len,
00083                         const ACE_Time_Value *s = 0);
00084 
00085 public:
00086   /// @todo These methods IMHO should have more meaningful names.
00087   /// The names seem to indicate nothing.
00088   virtual int send_request (TAO_Stub *stub,
00089                             TAO_ORB_Core *orb_core,
00090                             TAO_OutputCDR &stream,
00091                             int message_semantics,
00092                             ACE_Time_Value *max_wait_time);
00093 
00094   virtual int send_message (TAO_OutputCDR &stream,
00095                             TAO_Stub *stub = 0,
00096                             int message_semantics = TAO_Transport::TAO_TWOWAY_REQUEST,
00097                             ACE_Time_Value *max_time_wait = 0);
00098 
00099   /// Initialising the messaging object
00100   virtual int messaging_init (CORBA::Octet major,
00101                               CORBA::Octet minor);
00102 
00103   //@}
00104 
00105 private:
00106 
00107   /// The connection service handler used for accessing lower layer
00108   /// communication protocols.
00109   TAO_UIOP_Connection_Handler *connection_handler_;
00110 
00111   /// Our messaging object.
00112   TAO_Pluggable_Messaging *messaging_object_;
00113 };
00114 
00115 TAO_END_VERSIONED_NAMESPACE_DECL
00116 
00117 # endif  /* TAO_HAS_UIOP == 1 */
00118 
00119 #include /**/ "ace/post.h"
00120 
00121 #endif  /* TAO_UIOP_TRANSPORT_H */

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