SSLIOP_Connector.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file     SSLIOP_Connector.h
00006  *
00007  *  $Id: SSLIOP_Connector.h 76589 2007-01-25 18:04:11Z elliott_c $
00008  *
00009  *  SSLIOP specific connector processing
00010  *
00011  *  @author Carlos O'Ryan
00012  *  @author Ossama Othman
00013  */
00014 //=============================================================================
00015 
00016 
00017 #ifndef TAO_SSLIOP_CONNECTOR_H
00018 #define TAO_SSLIOP_CONNECTOR_H
00019 
00020 #include /**/ "ace/pre.h"
00021 
00022 #include "ace/config-all.h"
00023 
00024 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00025 # pragma once
00026 #endif /* ACE_LACKS_PRAGMA_ONCE */
00027 
00028 #include "orbsvcs/SSLIOP/IIOP_SSL_Connector.h"
00029 #include "orbsvcs/SSLIOP/SSLIOP_Connection_Handler.h"
00030 
00031 #include "ace/SSL/SSL_SOCK_Connector.h"
00032 
00033 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00034 
00035 /// Forward declarations.
00036 class TAO_Base_Transport_Property;
00037 
00038 class TAO_SSLIOP_Endpoint;
00039 
00040 namespace TAO
00041 {
00042   namespace SSLIOP
00043   {
00044     class OwnCredentials;
00045 
00046     /**
00047      * @class Connector
00048      *
00049      * @brief SSLIOP-specific Connector bridge for pluggable protocols.
00050      *
00051      * Concrete instance of the TAO_Connector class.  Responsible
00052      * for establishing a connection with a server and is called from
00053      * the Connector_Registry.
00054      */
00055     class Connector : public TAO::IIOP_SSL_Connector
00056     {
00057     public:
00058 
00059       /// Constructor.
00060       Connector (::Security::QOP qop);
00061 
00062       /**
00063        * @name The TAO_Connector methods
00064        *
00065        * Please check the documentation in Transport_Connector.h
00066        */
00067       //@{
00068       virtual int open (TAO_ORB_Core *orb_core);
00069       virtual int close (void);
00070       virtual TAO_Transport *connect (TAO::Profile_Transport_Resolver *r,
00071                                       TAO_Transport_Descriptor_Interface *desc,
00072                                       ACE_Time_Value *timeout);
00073 
00074       virtual TAO_Profile *create_profile (TAO_InputCDR& cdr);
00075       virtual int check_prefix (const char *endpoint);
00076       virtual TAO_Profile * corbaloc_scan (const char *ior,
00077                                            size_t &len);
00078 
00079       //@}
00080 
00081     protected:
00082 
00083       /**
00084        * @name @c TAO_Connector Methods
00085        *
00086        * Methods required by the @c TAO_Connector base class.
00087        *
00088        * @see @c TAO_Connector
00089        */
00090       //@{
00091       virtual TAO_Profile * make_profile (void);
00092       virtual int cancel_svc_handler (TAO_Connection_Handler * svc_handler);
00093       //@}
00094 
00095       /// SSL-specific profile
00096       TAO_Profile * make_secure_profile (void);
00097 
00098       /// IIOP-specific connection establishment.
00099       /**
00100        * @note The IIOP endpoint is extracted from the SSLIOP endpoint.
00101        */
00102       TAO_Transport* iiop_connect (TAO_SSLIOP_Endpoint *ssliop_endpoint,
00103                                    TAO::Profile_Transport_Resolver *r,
00104                                    ACE_Time_Value *timeout);
00105 
00106       /// SSLIOP-specific connection establishment.
00107       TAO_Transport* ssliop_connect (TAO_SSLIOP_Endpoint *ssliop_endpoint,
00108                                      ::Security::QOP qop,
00109                                      const ::Security::EstablishTrust &trust,
00110                                      TAO::Profile_Transport_Resolver *r,
00111                                      TAO_Transport_Descriptor_Interface *desc,
00112                                      ACE_Time_Value *timeout);
00113 
00114       /// Retrieve SSLIOP credentials from the policy overrides list
00115       /// and set up the underlying SSL connection to use the X.509
00116       /// certificates stored within them.
00117       TAO::SSLIOP::OwnCredentials * retrieve_credentials (TAO_Stub *stub,
00118                                                           SSL *ssl);
00119 
00120     public:
00121 
00122       typedef TAO_Connect_Concurrency_Strategy<Connection_Handler>
00123           CONNECT_CONCURRENCY_STRATEGY;
00124 
00125       typedef TAO_Connect_Creation_Strategy<Connection_Handler>
00126           CONNECT_CREATION_STRATEGY;
00127 
00128       typedef ACE_Connect_Strategy<Connection_Handler,
00129                                    ACE_SSL_SOCK_CONNECTOR>
00130           CONNECT_STRATEGY;
00131 
00132       typedef ACE_Strategy_Connector<Connection_Handler,
00133                                      ACE_SSL_SOCK_CONNECTOR>
00134           BASE_CONNECTOR;
00135 
00136     private:
00137 
00138       /// If zero, connect to IIOP over SSL port by default.
00139       /// Otherwise, connect to the insecure IIOP port.
00140       ::Security::QOP qop_;
00141 
00142       /// Our connect strategy
00143       CONNECT_STRATEGY connect_strategy_;
00144 
00145       /// The connector initiating connection requests for IIOP.
00146       BASE_CONNECTOR base_connector_;
00147 
00148     };
00149 
00150   }  // End SSLIOP namespace.
00151 }  // End TAO namespace.
00152 
00153 TAO_END_VERSIONED_NAMESPACE_DECL
00154 
00155 #include /**/ "ace/post.h"
00156 
00157 #endif  /* TAO_SSLIOP_CONNECTOR_H */

Generated on Sun Jan 27 16:12:24 2008 for TAO_SSLIOP by doxygen 1.3.6