DIOP_Transport.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file   DIOP_Transport.h
00006  *
00007  *  $Id: DIOP_Transport.h 80603 2008-02-11 22:14:39Z johnc $
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_Dgram.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_DGRAM, 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_Acceptor;
00042 
00043 // Service Handler for this transport
00044 typedef ACE_Svc_Handler<ACE_SOCK_DGRAM, ACE_NULL_SYNCH>
00045         TAO_DIOP_SVC_HANDLER;
00046 
00047 /**
00048  * @class TAO_DIOP_Transport
00049  *
00050  * @brief Specialization of the base TAO_Transport class to handle the
00051  *  DIOP protocol.
00052  */
00053 class TAO_Strategies_Export TAO_DIOP_Transport : public TAO_Transport
00054 {
00055 public:
00056 
00057   /// Constructor.
00058   TAO_DIOP_Transport (TAO_DIOP_Connection_Handler *handler,
00059                       TAO_ORB_Core *orb_core);
00060 
00061   /// Default destructor.
00062   ~TAO_DIOP_Transport (void);
00063 
00064   /// Look for the documentation in Transport.h.
00065   virtual int handle_input (TAO_Resume_Handle &rh,
00066                             ACE_Time_Value *max_wait_time = 0);
00067 protected:
00068   /** @name Overridden Template Methods
00069    *
00070    * These are implementations of template methods declared by TAO_Transport.
00071    */
00072   //@{
00073 
00074   virtual ACE_Event_Handler * event_handler_i (void);
00075   virtual TAO_Connection_Handler *connection_handler_i (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 *max_wait_time);
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 register_handler (void);
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                             TAO_Message_Semantics message_semantics,
00097                             ACE_Time_Value *max_wait_time);
00098 
00099   virtual int send_message (TAO_OutputCDR &stream,
00100                             TAO_Stub *stub = 0,
00101                             TAO_Message_Semantics message_semantics = TAO_Transport::TAO_TWOWAY_REQUEST,
00102                             ACE_Time_Value *max_time_wait = 0);
00103 
00104 private:
00105 
00106   /// The connection service handler used for accessing lower layer
00107   /// communication protocols.
00108   TAO_DIOP_Connection_Handler *connection_handler_;
00109 };
00110 
00111 TAO_END_VERSIONED_NAMESPACE_DECL
00112 
00113 #endif /* TAO_HAS_DIOP && TAO_HAS_DIOP != 0 */
00114 
00115 #include /**/ "ace/post.h"
00116 
00117 #endif  /* TAO_DIOP_TRANSPORT_H */

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