00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file UIOP_Connector.h 00006 * 00007 * $Id: UIOP_Connector.h 78931 2007-07-18 09:59:36Z johnnyw $ 00008 * 00009 * UIOP specific connector processing 00010 * 00011 * 00012 * @author Fred Kuhns <fredk@cs.wustl.edu> 00013 * @author Ossama Othman <ossama@uci.edu> 00014 */ 00015 //============================================================================= 00016 00017 00018 #ifndef TAO_UIOP_CONNECTOR_H 00019 #define TAO_UIOP_CONNECTOR_H 00020 00021 #include /**/ "ace/pre.h" 00022 00023 #include "tao/orbconf.h" 00024 00025 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00026 # pragma once 00027 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00028 00029 # if TAO_HAS_UIOP == 1 00030 00031 #include "ace/LSOCK_Connector.h" 00032 #include "ace/Connector.h" 00033 #include "tao/Transport_Connector.h" 00034 #include "tao/Strategies/UIOP_Connection_Handler.h" 00035 #include "tao/Resource_Factory.h" 00036 #include "tao/Connector_Impl.h" 00037 00038 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00039 00040 class TAO_UIOP_Endpoint; 00041 class TAO_Endpoint; 00042 00043 /** 00044 * @class TAO_UIOP_Connector 00045 * 00046 * @brief UIOP-specific Connector bridge for pluggable protocols. 00047 * 00048 */ 00049 class TAO_Strategies_Export TAO_UIOP_Connector : public TAO_Connector 00050 { 00051 public: 00052 00053 /** 00054 * Constructor. 00055 * @@ Do we want to pass in the tag here or should it be statically 00056 * defined? 00057 */ 00058 TAO_UIOP_Connector (void); 00059 00060 /// Destructor 00061 ~TAO_UIOP_Connector (void); 00062 00063 /** 00064 * @name The TAO_Connector Methods 00065 * 00066 * Please check the documentation in Transport_Connector.h for details. 00067 */ 00068 //@{ 00069 int open (TAO_ORB_Core *orb_core); 00070 int close (void); 00071 00072 TAO_Profile *create_profile (TAO_InputCDR& cdr); 00073 00074 virtual int check_prefix (const char *endpoint); 00075 00076 virtual TAO_Profile *corbaloc_scan (const char *str, size_t &len 00077 ); 00078 00079 virtual char object_key_delimiter (void) const; 00080 00081 /// Cancel the passed cvs handler from the connector 00082 virtual int cancel_svc_handler (TAO_Connection_Handler * svc_handler); 00083 //@} 00084 00085 public: 00086 00087 typedef TAO_Connect_Concurrency_Strategy<TAO_UIOP_Connection_Handler> 00088 TAO_UIOP_CONNECT_CONCURRENCY_STRATEGY; 00089 00090 typedef TAO_Connect_Creation_Strategy<TAO_UIOP_Connection_Handler> 00091 TAO_UIOP_CONNECT_CREATION_STRATEGY; 00092 00093 typedef ACE_Connect_Strategy<TAO_UIOP_Connection_Handler, 00094 ACE_LSOCK_CONNECTOR> 00095 TAO_UIOP_CONNECT_STRATEGY ; 00096 00097 typedef ACE_Strategy_Connector<TAO_UIOP_Connection_Handler, 00098 ACE_LSOCK_CONNECTOR> 00099 TAO_UIOP_BASE_CONNECTOR; 00100 00101 protected: 00102 00103 /** 00104 * @name More TAO_Connector methods 00105 * 00106 * Please check the documentation in Transport_Connector.h. 00107 */ 00108 //@{ 00109 int set_validate_endpoint (TAO_Endpoint *endpoint); 00110 00111 TAO_Transport *make_connection (TAO::Profile_Transport_Resolver *r, 00112 TAO_Transport_Descriptor_Interface &desc, 00113 ACE_Time_Value *timeout = 0); 00114 00115 virtual TAO_Profile *make_profile (void); 00116 00117 //@} 00118 00119 private: 00120 00121 /// Return the remote endpoint, a helper function 00122 TAO_UIOP_Endpoint *remote_endpoint (TAO_Endpoint *ep); 00123 00124 private: 00125 00126 /// Our connect strategy 00127 TAO_UIOP_CONNECT_STRATEGY connect_strategy_; 00128 00129 /// The connector initiating connection requests for UIOP. 00130 TAO_UIOP_BASE_CONNECTOR base_connector_; 00131 }; 00132 00133 TAO_END_VERSIONED_NAMESPACE_DECL 00134 00135 # endif /* TAO_HAS_UIOP == 1 */ 00136 00137 #include /**/ "ace/post.h" 00138 00139 #endif /* TAO_UIOP_CONNECTOR_H */