00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file Connector_Registry.h 00006 * 00007 * Connector_Registry.h,v 1.34 2006/06/19 19:46:40 jwillemsen Exp 00008 * 00009 * Interface for the TAO Connector Registry 00010 * 00011 * @author Fred Kuhns <fredk@cs.wustl.edu> 00012 */ 00013 //============================================================================= 00014 00015 #ifndef TAO_CONNECTOR_REGISTRY_H 00016 #define TAO_CONNECTOR_REGISTRY_H 00017 #include /**/ "ace/pre.h" 00018 00019 #include "tao/TAO_Export.h" 00020 00021 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00022 # pragma once 00023 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00024 00025 #include "ace/CORBA_macros.h" 00026 #include "tao/Basic_Types.h" 00027 #include "ace/Global_Macros.h" 00028 00029 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00030 00031 // Forward declarations. 00032 class TAO_ORB_Core; 00033 class TAO_Connector; 00034 class TAO_MProfile; 00035 class TAO_Profile; 00036 class TAO_InputCDR; 00037 00038 namespace CORBA 00039 { 00040 class Environment; 00041 } 00042 00043 typedef TAO_Connector** TAO_ConnectorSetIterator; 00044 00045 /** 00046 * @class TAO_Connector_Registry 00047 * 00048 * @brief Per-ORB TAO Connector Registry 00049 * 00050 * Connector Registry and Generic Connector interface definitions. 00051 * All loaded ESIOP or GIOP connector bridges must register with 00052 * this object. 00053 * This class is able to dynamically load a set of 00054 * concrete protocol connectors which have registered with the service 00055 * configurator and added their Factory name to the Resource_Factory 00056 * line of the svc.conf file. 00057 */ 00058 class TAO_Export TAO_Connector_Registry 00059 { 00060 public: 00061 /// Default constructor. 00062 TAO_Connector_Registry (void); 00063 00064 /// Default destructor. 00065 ~TAO_Connector_Registry (void); 00066 00067 /// Return the connector bridges 00068 TAO_Connector *get_connector (CORBA::ULong tag) const; 00069 00070 /// Initialize all registered connectors. 00071 int open (TAO_ORB_Core *orb_core); 00072 00073 /// Close all open connectors. 00074 int close_all (void); 00075 00076 /// Parse a string containing a URL style IOR and return an 00077 /// MProfile. 00078 int make_mprofile (const char *ior, 00079 TAO_MProfile &mprofile 00080 ACE_ENV_ARG_DECL); 00081 00082 /// Create a profile based on the contents of @a cdr 00083 TAO_Profile* create_profile (TAO_InputCDR& cdr); 00084 00085 /// Obtain the object key delimiter used by the protocol specified in 00086 /// the provided URL style IOR. 00087 char object_key_delimiter (const char *ior); 00088 00089 // = Iterator. 00090 TAO_ConnectorSetIterator begin (void) const; 00091 TAO_ConnectorSetIterator end (void) const; 00092 00093 private: 00094 // Disallow copying and assignment. 00095 TAO_Connector_Registry (const TAO_Connector_Registry&); 00096 void operator= (const TAO_Connector_Registry&); 00097 00098 private: 00099 /// List of connectors that are currently open. 00100 TAO_Connector** connectors_; 00101 00102 /// Number of connectors that are currently open. 00103 size_t size_; 00104 }; 00105 00106 TAO_END_VERSIONED_NAMESPACE_DECL 00107 00108 #if defined(__ACE_INLINE__) 00109 #include "tao/Connector_Registry.i" 00110 #endif /* __ACE_INLINE__ */ 00111 00112 #include /**/ "ace/post.h" 00113 #endif /* TAO_CONNECTOR_REGISTRY_H */