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 79151 2007-08-01 09:04:36Z 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_Pluggable_Messaging;
00034 class TAO_Acceptor;
00035 
00036 /**
00037  * @class TAO_UIPMC_Transport
00038  *
00039  * @brief Specialization of the base TAO_Transport class to handle the
00040  *  MIOP protocol.
00041  */
00042 template<typename CONNECTION_HANDLER>
00043 class TAO_PortableGroup_Export TAO_UIPMC_Transport : public TAO_Transport
00044 {
00045 public:
00046 
00047   /// Constructor.
00048   TAO_UIPMC_Transport (CONNECTION_HANDLER *handler,
00049                        TAO_ORB_Core *orb_core);
00050 
00051   /// Default destructor.
00052   ~TAO_UIPMC_Transport (void);
00053 
00054   /// Look for the documentation in Transport.h.
00055   virtual int handle_input (TAO_Resume_Handle &rh,
00056                             ACE_Time_Value *max_wait_time = 0);
00057 protected:
00058   /** @name Overridden Template Methods
00059    *
00060    * These are implementations of template methods declared by TAO_Transport.
00061    */
00062   //@{
00063 
00064   virtual ACE_Event_Handler * event_handler_i (void);
00065   virtual TAO_Connection_Handler *connection_handler_i (void);
00066   virtual TAO_Pluggable_Messaging *messaging_object (void);
00067 
00068   /// Write the complete Message_Block chain to the connection.
00069   virtual ssize_t send (iovec *iov, int iovcnt,
00070                         size_t &bytes_transferred,
00071                         const ACE_Time_Value *max_wait_time);
00072 
00073 
00074   /// Read len bytes from into buf.
00075   virtual ssize_t recv (char *buf,
00076                         size_t len,
00077                         const ACE_Time_Value *s = 0);
00078 
00079   virtual int register_handler (void);
00080 
00081 public:
00082   /// @@TODO: These methods IMHO should have more meaningful
00083   /// names. The names seem to indicate nothing.
00084   virtual int send_request (TAO_Stub *stub,
00085                             TAO_ORB_Core *orb_core,
00086                             TAO_OutputCDR &stream,
00087                             int message_semantics,
00088                             ACE_Time_Value *max_wait_time);
00089 
00090   virtual int send_message (TAO_OutputCDR &stream,
00091                             TAO_Stub *stub = 0,
00092                             int message_semantics = TAO_Transport::TAO_TWOWAY_REQUEST,
00093                             ACE_Time_Value *max_time_wait = 0);
00094 
00095   /// Initialising the messaging object
00096   virtual int messaging_init (CORBA::Octet major,
00097                               CORBA::Octet minor);
00098 
00099   //@}
00100 
00101 private:
00102   /// Construct and write a unique ID to the MIOP header.
00103   void write_unique_id (TAO_OutputCDR &miop_hdr, unsigned long unique);
00104 
00105 private:
00106 
00107   /// The connection service handler used for accessing lower layer
00108   /// communication protocols.
00109   CONNECTION_HANDLER *connection_handler_;
00110 
00111   /// Our messaging object.
00112   TAO_Pluggable_Messaging *messaging_object_;
00113 };
00114 
00115 TAO_END_VERSIONED_NAMESPACE_DECL
00116 
00117 #if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
00118 #include "orbsvcs/PortableGroup/UIPMC_Transport.cpp"
00119 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */
00120 
00121 #if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
00122 #pragma implementation ("orbsvcs/PortableGroup/UIPMC_Transport.cpp")
00123 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */
00124 
00125 #include /**/ "ace/post.h"
00126 #endif  /* TAO_UIPMC_TRANSPORT_H */

Generated on Sun Jan 27 16:22:31 2008 for TAO_PortableGroup by doxygen 1.3.6