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 80288 2007-12-17 20:05:04Z 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_Target_Specification;
00040 class Tao_Operation_Details;
00041 
00042 typedef ACE_Svc_Handler<ACE_MEM_STREAM, ACE_NULL_SYNCH>
00043          TAO_SHMIOP_SVC_HANDLER;
00044 
00045 /**
00046  * @class TAO_SHMIOP_Transport
00047  *
00048  * @brief Specialization of the base TAO_Transport class to handle the
00049  *  SHMIOP protocol.
00050  *
00051  */
00052 
00053 class TAO_Strategies_Export TAO_SHMIOP_Transport : public TAO_Transport
00054 {
00055 public:
00056 
00057   /// Constructor.
00058   TAO_SHMIOP_Transport (TAO_SHMIOP_Connection_Handler *handler,
00059                         TAO_ORB_Core *orb_core);
00060 
00061   /// Default destructor.
00062   ~TAO_SHMIOP_Transport (void);
00063 
00064 protected:
00065   /**
00066    * @name Overridden Template Methods
00067    *
00068    * These are implementations of template methods declared by TAO_Transport.
00069    */
00070   //@{
00071   virtual ACE_Event_Handler * event_handler_i (void);
00072   virtual TAO_Connection_Handler *connection_handler_i (void);
00073 
00074   /// Write the complete Message_Block chain to the connection.
00075   virtual ssize_t send (iovec *iov, int iovcnt,
00076                         size_t &bytes_transferred,
00077                         const ACE_Time_Value *timeout = 0);
00078 
00079   /// Read len bytes from into buf.
00080   virtual ssize_t recv (char *buf,
00081                         size_t len,
00082                         const ACE_Time_Value *s = 0);
00083 
00084   virtual int handle_input (TAO_Resume_Handle &rh,
00085                             ACE_Time_Value *max_wait_time);
00086   //@}
00087 
00088 public:
00089   /// @todo These methods IMHO should have more meaningful names.
00090   /// The names seem to indicate nothing.
00091   virtual int send_request (TAO_Stub *stub,
00092                             TAO_ORB_Core *orb_core,
00093                             TAO_OutputCDR &stream,
00094                             TAO_Message_Semantics message_semantics,
00095                             ACE_Time_Value *max_wait_time);
00096 
00097   virtual int send_message (TAO_OutputCDR &stream,
00098                             TAO_Stub *stub = 0,
00099                             TAO_Message_Semantics message_semantics = TAO_Transport::TAO_TWOWAY_REQUEST,
00100                             ACE_Time_Value *max_time_wait = 0);
00101 
00102 private:
00103   /// The connection service handler used for accessing lower layer
00104   /// communication protocols.
00105   TAO_SHMIOP_Connection_Handler *connection_handler_;
00106 };
00107 
00108 TAO_END_VERSIONED_NAMESPACE_DECL
00109 
00110 #endif /* TAO_HAS_SHMIOP && TAO_HAS_SHMIOP != 0 */
00111 
00112 #include /**/ "ace/post.h"
00113 
00114 #endif /* TAO_SHMIOP_TRANSPORT_H */

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