SHMIOP_Transport.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 // ===================================================================
00004 /**
00005  *  @file   SHMIOP_Transport.h
00006  *
00007  *  SHMIOP_Transport.h,v 1.29 2006/04/19 11:38:50 jwillemsen Exp
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                         CORBA::Boolean flag);
00062 
00063   /// Default destructor.
00064   ~TAO_SHMIOP_Transport (void);
00065 
00066 protected:
00067   /**
00068    * @name Overridden Template Methods
00069    *
00070    * These are implementations of template methods declared by TAO_Transport.
00071    */
00072   //@{
00073   virtual ACE_Event_Handler * event_handler_i (void);
00074   virtual TAO_Connection_Handler *connection_handler_i (void);
00075   virtual TAO_Pluggable_Messaging *messaging_object (void);
00076 
00077   /// Write the complete Message_Block chain to the connection.
00078   virtual ssize_t send (iovec *iov, int iovcnt,
00079                         size_t &bytes_transferred,
00080                         const ACE_Time_Value *timeout = 0);
00081 
00082   /// Read len bytes from into buf.
00083   virtual ssize_t recv (char *buf,
00084                         size_t len,
00085                         const ACE_Time_Value *s = 0);
00086 
00087   virtual int handle_input (TAO_Resume_Handle &rh,
00088                             ACE_Time_Value *max_wait_time,
00089                             int block = 0);
00090   //@}
00091 
00092 public:
00093   /// @todo These methods IMHO should have more meaningful names.
00094   /// The names seem to indicate nothing.
00095   virtual int send_request (TAO_Stub *stub,
00096                             TAO_ORB_Core *orb_core,
00097                             TAO_OutputCDR &stream,
00098                             int message_semantics,
00099                             ACE_Time_Value *max_wait_time);
00100 
00101   virtual int send_message (TAO_OutputCDR &stream,
00102                             TAO_Stub *stub = 0,
00103                             int message_semantics = TAO_Transport::TAO_TWOWAY_REQUEST,
00104                             ACE_Time_Value *max_time_wait = 0);
00105 
00106   /// Initialising the messaging object
00107   virtual int messaging_init (CORBA::Octet major,
00108                               CORBA::Octet minor);
00109 
00110 private:
00111   /// The connection service handler used for accessing lower layer
00112   /// communication protocols.
00113   TAO_SHMIOP_Connection_Handler *connection_handler_;
00114 
00115   /// Our messaging object.
00116   TAO_Pluggable_Messaging *messaging_object_;
00117 };
00118 
00119 TAO_END_VERSIONED_NAMESPACE_DECL
00120 
00121 #endif /* TAO_HAS_SHMIOP && TAO_HAS_SHMIOP != 0 */
00122 
00123 #include /**/ "ace/post.h"
00124 
00125 #endif /* TAO_SHMIOP_TRANSPORT_H */

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