UIPMC_Transport.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file     UIPMC_Transport.h
00006  *
00007  *  $Id: UIPMC_Transport.h 80288 2007-12-17 20:05:04Z johnnyw $
00008  *
00009  *  @author Frank Hunleth <fhunleth@cs.wustl.edu>
00010  */
00011 //=============================================================================
00012 
00013 #ifndef TAO_UIPMC_TRANSPORT_H
00014 #define TAO_UIPMC_TRANSPORT_H
00015 #include /**/ "ace/pre.h"
00016 
00017 #include "orbsvcs/PortableGroup/portablegroup_export.h"
00018 
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 # pragma once
00021 #endif /* ACE_LACKS_PRAGMA_ONCE */
00022 
00023 #include "tao/Transport.h"
00024 
00025 #include "ace/SOCK_Stream.h"
00026 #include "ace/Svc_Handler.h"
00027 
00028 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00029 
00030 // Forward decls.
00031 class TAO_ORB_Core;
00032 class TAO_Operation_Details;
00033 class TAO_Acceptor;
00034 
00035 /**
00036  * @class TAO_UIPMC_Transport
00037  *
00038  * @brief Specialization of the base TAO_Transport class to handle the
00039  *  MIOP protocol.
00040  */
00041 template<typename CONNECTION_HANDLER>
00042 class TAO_PortableGroup_Export TAO_UIPMC_Transport : public TAO_Transport
00043 {
00044 public:
00045 
00046   /// Constructor.
00047   TAO_UIPMC_Transport (CONNECTION_HANDLER *handler,
00048                        TAO_ORB_Core *orb_core);
00049 
00050   /// Default destructor.
00051   ~TAO_UIPMC_Transport (void);
00052 
00053   /// Look for the documentation in Transport.h.
00054   virtual int handle_input (TAO_Resume_Handle &rh,
00055                             ACE_Time_Value *max_wait_time = 0);
00056 protected:
00057   /** @name Overridden Template Methods
00058    *
00059    * These are implementations of template methods declared by TAO_Transport.
00060    */
00061   //@{
00062 
00063   virtual ACE_Event_Handler * event_handler_i (void);
00064   virtual TAO_Connection_Handler *connection_handler_i (void);
00065 
00066   /// Write the complete Message_Block chain to the connection.
00067   virtual ssize_t send (iovec *iov, int iovcnt,
00068                         size_t &bytes_transferred,
00069                         const ACE_Time_Value *max_wait_time);
00070 
00071 
00072   /// Read len bytes from into buf.
00073   virtual ssize_t recv (char *buf,
00074                         size_t len,
00075                         const ACE_Time_Value *s = 0);
00076 
00077   virtual int register_handler (void);
00078 
00079 public:
00080   /// @@TODO: These methods IMHO should have more meaningful
00081   /// names. The names seem to indicate nothing.
00082   virtual int send_request (TAO_Stub *stub,
00083                             TAO_ORB_Core *orb_core,
00084                             TAO_OutputCDR &stream,
00085                             TAO_Message_Semantics message_semantics,
00086                             ACE_Time_Value *max_wait_time);
00087 
00088   virtual int send_message (TAO_OutputCDR &stream,
00089                             TAO_Stub *stub = 0,
00090                             TAO_Message_Semantics message_semantics = TAO_Transport::TAO_TWOWAY_REQUEST,
00091                             ACE_Time_Value *max_time_wait = 0);
00092   //@}
00093 
00094 private:
00095   /// Construct and write a unique ID to the MIOP header.
00096   void write_unique_id (TAO_OutputCDR &miop_hdr, unsigned long unique);
00097 
00098 private:
00099 
00100   /// The connection service handler used for accessing lower layer
00101   /// communication protocols.
00102   CONNECTION_HANDLER *connection_handler_;
00103 };
00104 
00105 TAO_END_VERSIONED_NAMESPACE_DECL
00106 
00107 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00108 #include "orbsvcs/PortableGroup/UIPMC_Transport.cpp"
00109 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
00110 
00111 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00112 #pragma implementation ("orbsvcs/PortableGroup/UIPMC_Transport.cpp")
00113 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00114 
00115 #include /**/ "ace/post.h"
00116 #endif  /* TAO_UIPMC_TRANSPORT_H */

Generated on Tue Feb 2 17:49:50 2010 for TAO_PortableGroup by  doxygen 1.4.7