SSLIOP_Transport.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file   SSLIOP_Transport.h
00006  *
00007  *  $Id: SSLIOP_Transport.h 80288 2007-12-17 20:05:04Z johnnyw $
00008  *
00009  *  SSLIOP Transport specific processing.
00010  *
00011  *  @author Carlos O'Ryan <coryan@ece.uci.edu>
00012  *  @author Ossama Othman <ossama@dre.vanderbilt.edu>
00013  */
00014 //=============================================================================
00015 
00016 
00017 #ifndef TAO_SSLIOP_TRANSPORT_H
00018 #define TAO_SSLIOP_TRANSPORT_H
00019 
00020 #include /**/ "ace/pre.h"
00021 
00022 #include "orbsvcs/SSLIOP/SSLIOP_Export.h"
00023 
00024 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00025 # pragma once
00026 #endif /* ACE_LACKS_PRAGMA_ONCE */
00027 
00028 #include "tao/Transport.h"
00029 #include "tao/operation_details.h"
00030 #include "tao/GIOP_Message_Version.h"
00031 #include "tao/Pluggable_Messaging_Utils.h"
00032 #include "tao/IIOPC.h"
00033 
00034 #include "ace/SSL/SSL_SOCK_Stream.h"
00035 
00036 #include "ace/Svc_Handler.h"
00037 
00038 
00039 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00040 
00041 // Forward decls.
00042 class TAO_ORB_Core;
00043 class TAO_Acceptor;
00044 
00045 namespace TAO
00046 {
00047   namespace SSLIOP
00048   {
00049     typedef ACE_Svc_Handler<ACE_SSL_SOCK_STREAM, ACE_NULL_SYNCH> SVC_HANDLER;
00050 
00051     class Handler_Base;
00052     class Connection_Handler;
00053 
00054     /**
00055      * @class Transport
00056      *
00057      * @brief SSLIOP-specific transport implementation.
00058      *
00059      * SSLIOP-specific transport implementation.
00060      */
00061     class TAO_SSLIOP_Export Transport : public TAO_Transport
00062     {
00063     public:
00064 
00065       /// Constructor.
00066       Transport (Connection_Handler *handler,
00067                  TAO_ORB_Core *orb_core);
00068 
00069       /// Default destructor.
00070       ~Transport (void);
00071 
00072       /// Overload of the handle_input () in the TAO_Transport
00073       /// class. This is required to set up the state guard. The
00074       /// thread-per-connection and wait on RW strategies call this
00075       /// handle_input ().
00076       virtual int handle_input (TAO_Resume_Handle &rh,
00077                                 ACE_Time_Value *max_wait_time = 0);
00078 
00079     protected:
00080       /** @name Overridden Template Methods
00081        *
00082        * These are implementations of template methods declared by
00083        * TAO_Transport.
00084        */
00085       //@{
00086       virtual ACE_Event_Handler * event_handler_i (void);
00087       virtual TAO_Connection_Handler *connection_handler_i (void);
00088 
00089       /// Write the complete Message_Block chain to the connection.
00090       virtual ssize_t send (iovec *iov, int iovcnt,
00091                             size_t &bytes_transferred,
00092                             const ACE_Time_Value *timeout = 0);
00093 
00094       /// Read len bytes from into buf.
00095       virtual ssize_t recv (char *buf,
00096                             size_t len,
00097                             const ACE_Time_Value *s = 0);
00098 
00099     public:
00100       /// @todo These methods IMHO should have more meaningful
00101       ///       names. The names seem to indicate nothing.
00102       virtual int send_request (TAO_Stub *stub,
00103                                 TAO_ORB_Core *orb_core,
00104                                 TAO_OutputCDR &stream,
00105                                 TAO_Message_Semantics message_semantics,
00106                                 ACE_Time_Value *max_wait_time);
00107 
00108       virtual int send_message (TAO_OutputCDR &stream,
00109                                 TAO_Stub *stub = 0,
00110                                 TAO_Message_Semantics message_semantics =
00111                                   TAO_Transport::TAO_TWOWAY_REQUEST,
00112                                 ACE_Time_Value *max_time_wait = 0);
00113 
00114       virtual int generate_request_header (TAO_Operation_Details &opdetails,
00115                                            TAO_Target_Specification &spec,
00116                                            TAO_OutputCDR &msg);
00117 
00118       /// Open teh service context list and process it.
00119       virtual int tear_listen_point_list (TAO_InputCDR &cdr);
00120       //@}
00121 
00122     private:
00123 
00124       /// Set the Bidirectional context info in the service context
00125       /// list.
00126       void set_bidir_context_info (TAO_Operation_Details &opdetails);
00127 
00128       /// Add the listen points in @a acceptor to the @a
00129       /// listen_point_list if this connection is in the same
00130       /// interface as that of the endpoints in the @a acceptor.
00131       int get_listen_point (IIOP::ListenPointList &listen_point_list,
00132                             TAO_Acceptor *acceptor);
00133 
00134     private:
00135 
00136       /// The connection service handler used for accessing lower layer
00137       /// communication protocols.
00138       Connection_Handler *connection_handler_;
00139     };
00140 
00141   }  // End SSLIOP namespace.
00142 }  // End TAO namespace.
00143 
00144 TAO_END_VERSIONED_NAMESPACE_DECL
00145 
00146 #include /**/ "ace/post.h"
00147 #endif  /* TAO_SSLIOP_TRANSPORT_H */

Generated on Tue Feb 2 17:48:44 2010 for TAO_SSLIOP by  doxygen 1.4.7