UIOP_Transport.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 // ===================================================================
00004 /**
00005  *  @file   UIOP_Transport.h
00006  *
00007  *  $Id: UIOP_Transport.h 80288 2007-12-17 20:05:04Z johnnyw $
00008  *
00009  *  @author Originally by Fred Kuhns <fredk@cs.wustl.edu>
00010  *  @author Ossama Othman <ossama@ece.uci.edu>
00011  *  @author Modified by Balachandran Natarajan <bala@cs.wustl.edu>
00012  */
00013 // ===================================================================
00014 
00015 #ifndef TAO_UIOP_TRANSPORT_H
00016 #define TAO_UIOP_TRANSPORT_H
00017 
00018 #include /**/ "ace/pre.h"
00019 
00020 #include "tao/orbconf.h"
00021 
00022 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00023 # pragma once
00024 #endif /* ACE_LACKS_PRAGMA_ONCE */
00025 
00026 # if TAO_HAS_UIOP == 1
00027 
00028 #include "tao/Strategies/strategies_export.h"
00029 #include "ace/LSOCK_Acceptor.h"
00030 #include "ace/Svc_Handler.h"
00031 #include "tao/Transport.h"
00032 
00033 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00034 
00035 // Forward decls.
00036 
00037 class TAO_ORB_Core;
00038 class TAO_UIOP_Connection_Handler;
00039 
00040 typedef ACE_Svc_Handler<ACE_LSOCK_STREAM, ACE_NULL_SYNCH>
00041         TAO_UIOP_SVC_HANDLER;
00042 
00043 /**
00044  * @class TAO_UIOP_Transport
00045  *
00046  * @brief Specialization of the base TAO_Transport class to handle the
00047  *  UIOP protocol.
00048  *
00049  */
00050 
00051 class TAO_Strategies_Export TAO_UIOP_Transport : public TAO_Transport
00052 {
00053 public:
00054 
00055   /// Constructor.
00056   TAO_UIOP_Transport (TAO_UIOP_Connection_Handler *handler,
00057                       TAO_ORB_Core *orb_core);
00058 
00059   /// Default destructor.
00060   ~TAO_UIOP_Transport (void);
00061 
00062 protected:
00063   /** @name Overridden Template Methods
00064    *
00065    * These are implementations of template methods declared by TAO_Transport.
00066    */
00067   //@{
00068 
00069   virtual ACE_Event_Handler * event_handler_i (void);
00070   virtual TAO_Connection_Handler *connection_handler_i (void);
00071 
00072   /// Write the complete Message_Block chain to the connection.
00073   virtual ssize_t send (iovec *iov, int iovcnt,
00074                         size_t &bytes_transferred,
00075                         const ACE_Time_Value *timeout = 0);
00076 
00077   /// Read len bytes from into buf.
00078   virtual ssize_t recv (char *buf,
00079                         size_t len,
00080                         const ACE_Time_Value *s = 0);
00081 
00082 public:
00083   /// @todo These methods IMHO should have more meaningful names.
00084   /// The names seem to indicate nothing.
00085   virtual int send_request (TAO_Stub *stub,
00086                             TAO_ORB_Core *orb_core,
00087                             TAO_OutputCDR &stream,
00088                             TAO_Message_Semantics message_semantics,
00089                             ACE_Time_Value *max_wait_time);
00090 
00091   virtual int send_message (TAO_OutputCDR &stream,
00092                             TAO_Stub *stub = 0,
00093                             TAO_Message_Semantics message_semantics = TAO_Transport::TAO_TWOWAY_REQUEST,
00094                             ACE_Time_Value *max_time_wait = 0);
00095   //@}
00096 
00097 private:
00098 
00099   /// The connection service handler used for accessing lower layer
00100   /// communication protocols.
00101   TAO_UIOP_Connection_Handler *connection_handler_;
00102 };
00103 
00104 TAO_END_VERSIONED_NAMESPACE_DECL
00105 
00106 # endif  /* TAO_HAS_UIOP == 1 */
00107 
00108 #include /**/ "ace/post.h"
00109 
00110 #endif  /* TAO_UIOP_TRANSPORT_H */

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