SHMIOP_Transport.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 // ===================================================================
00004 /**
00005  *  @file   SHMIOP_Transport.h
00006  *
00007  *  $Id: SHMIOP_Transport.h 79151 2007-08-01 09:04:36Z johnnyw $
00008  *
00009  *  @author Nanbor Wang <nanbor@cs.wustl.edu>
00010  *  @author Balachandran Natarajan <bala@cs.wustl.edu>
00011  */
00012 // ===================================================================
00013 
00014 #ifndef TAO_SHMIOP_TRANSPORT_H
00015 #define TAO_SHMIOP_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_SHMIOP) && (TAO_HAS_SHMIOP != 0)
00026 
00027 #include "tao/Strategies/strategies_export.h"
00028 #include "ace/Svc_Handler.h"
00029 #include "ace/MEM_Stream.h"
00030 #include "tao/Transport.h"
00031 
00032 #if defined ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_EXPORT
00033 template class TAO_Strategies_Export ACE_Svc_Handler<ACE_MEM_STREAM, ACE_NULL_SYNCH>;
00034 #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION_EXPORT */
00035 
00036 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00037 
00038 class TAO_SHMIOP_Connection_Handler;
00039 class TAO_Pluggable_Messaging;
00040 class TAO_Target_Specification;
00041 class Tao_Operation_Details;
00042 
00043 typedef ACE_Svc_Handler<ACE_MEM_STREAM, ACE_NULL_SYNCH>
00044          TAO_SHMIOP_SVC_HANDLER;
00045 
00046 /**
00047  * @class TAO_SHMIOP_Transport
00048  *
00049  * @brief Specialization of the base TAO_Transport class to handle the
00050  *  SHMIOP protocol.
00051  *
00052  */
00053 
00054 class TAO_Strategies_Export TAO_SHMIOP_Transport : public TAO_Transport
00055 {
00056 public:
00057 
00058   /// Constructor.
00059   TAO_SHMIOP_Transport (TAO_SHMIOP_Connection_Handler *handler,
00060                         TAO_ORB_Core *orb_core);
00061 
00062   /// Default destructor.
00063   ~TAO_SHMIOP_Transport (void);
00064 
00065 protected:
00066   /**
00067    * @name Overridden Template Methods
00068    *
00069    * These are implementations of template methods declared by TAO_Transport.
00070    */
00071   //@{
00072   virtual ACE_Event_Handler * event_handler_i (void);
00073   virtual TAO_Connection_Handler *connection_handler_i (void);
00074   virtual TAO_Pluggable_Messaging *messaging_object (void);
00075 
00076   /// Write the complete Message_Block chain to the connection.
00077   virtual ssize_t send (iovec *iov, int iovcnt,
00078                         size_t &bytes_transferred,
00079                         const ACE_Time_Value *timeout = 0);
00080 
00081   /// Read len bytes from into buf.
00082   virtual ssize_t recv (char *buf,
00083                         size_t len,
00084                         const ACE_Time_Value *s = 0);
00085 
00086   virtual int handle_input (TAO_Resume_Handle &rh,
00087                             ACE_Time_Value *max_wait_time);
00088   //@}
00089 
00090 public:
00091   /// @todo These methods IMHO should have more meaningful names.
00092   /// The names seem to indicate nothing.
00093   virtual int send_request (TAO_Stub *stub,
00094                             TAO_ORB_Core *orb_core,
00095                             TAO_OutputCDR &stream,
00096                             int message_semantics,
00097                             ACE_Time_Value *max_wait_time);
00098 
00099   virtual int send_message (TAO_OutputCDR &stream,
00100                             TAO_Stub *stub = 0,
00101                             int message_semantics = TAO_Transport::TAO_TWOWAY_REQUEST,
00102                             ACE_Time_Value *max_time_wait = 0);
00103 
00104   /// Initialising the messaging object
00105   virtual int messaging_init (CORBA::Octet major, CORBA::Octet minor);
00106 
00107 private:
00108   /// The connection service handler used for accessing lower layer
00109   /// communication protocols.
00110   TAO_SHMIOP_Connection_Handler *connection_handler_;
00111 
00112   /// Our messaging object.
00113   TAO_Pluggable_Messaging *messaging_object_;
00114 };
00115 
00116 TAO_END_VERSIONED_NAMESPACE_DECL
00117 
00118 #endif /* TAO_HAS_SHMIOP && TAO_HAS_SHMIOP != 0 */
00119 
00120 #include /**/ "ace/post.h"
00121 
00122 #endif /* TAO_SHMIOP_TRANSPORT_H */

Generated on Sun Jan 27 15:59:50 2008 for TAO_Strategies by doxygen 1.3.6