summaryrefslogtreecommitdiff
path: root/TAO/tao/params.h
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>1999-07-09 00:41:29 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>1999-07-09 00:41:29 +0000
commit7aa2557f145dacd2e4f8844805279047ba9cf3a5 (patch)
treeca87ee3238689a83a76ef358a6dd8bffa8878431 /TAO/tao/params.h
parenta5e68ad3eb3a23f819af0c6c945453a8f3dc98fb (diff)
downloadATCD-7aa2557f145dacd2e4f8844805279047ba9cf3a5.tar.gz
Changed the preconnects container to an
ACE_Unbounded_Queue<ACE_CString> since it allows duplicate values and since it has already been instantiated in ACE. Since it has already been instantiated in ACE, no increase in TAO's footprint will occur. Furthermore, since the preconnect processing is not in a performance critical path, no degradation in performance will occur. [Bug 4]
Diffstat (limited to 'TAO/tao/params.h')
-rw-r--r--TAO/tao/params.h81
1 files changed, 68 insertions, 13 deletions
diff --git a/TAO/tao/params.h b/TAO/tao/params.h
index 2ceca84da56..04c3c9a69cb 100644
--- a/TAO/tao/params.h
+++ b/TAO/tao/params.h
@@ -25,17 +25,66 @@ class TAO_Active_Object_Map_Impl;
class TAO_Reverse_Active_Object_Map_Impl;
class TAO_IOR_LookupTable;
-// This is a quick hack to avoid having to unravel the intracacies of
+// This is a quick hack to avoid having to unravel the intricacies of
// the all the hairy order interdepencies that currently exist in TAO.
-#if ! defined (__ACE_INLINE__)
-#define TAO_LOCAL_INLINE
-#else
-#define TAO_LOCAL_INLINE ACE_INLINE
-#endif /* ! __ACE_INLINE__ */
+// #if ! defined (__ACE_INLINE__)
+// #define TAO_LOCAL_INLINE
+// #else
+// #define TAO_LOCAL_INLINE ACE_INLINE
+// #endif /* ! __ACE_INLINE__ */
typedef ACE_Unbounded_Set<ACE_CString> TAO_EndpointSet;
typedef ACE_Unbounded_Set_Iterator<ACE_CString> TAO_EndpointSetIterator;
+// @@ Using an ACE_Unbounded_Queue to contain the preconnects may not
+// be the best container to use. However, it will only be used
+// during client side initialization. Also, a template
+// instantiation of ACE_Unbounded_Queue<ACE_CString> already exists
+// in ACE so we do not have to worry about increasing TAO's
+// footprint by using this container.
+typedef ACE_Unbounded_Queue<ACE_CString> TAO_PreconnectSet;
+typedef ACE_Unbounded_Queue_Iterator<ACE_CString> TAO_PreconnectSetIterator;
+
+// -------------------------------------------------------------------
+// The following utility classes are used to insert endpoints and
+// preconnects into their corresponding containers, but at the same
+// time allow the same parsing code to be used for endpoints and
+// preconnects.
+
+// Base class that provides interface for insertion of
+class TAO_Base_Endpoint_Insertion_Strategy
+{
+public:
+ virtual int insert (const ACE_CString &endpoint) = 0;
+};
+
+// Utility class to insert endpoints into endpoint container.
+class TAO_Endpoint_Insertion_Strategy
+ : public TAO_Base_Endpoint_Insertion_Strategy
+{
+public:
+ TAO_Endpoint_Insertion_Strategy (TAO_EndpointSet &endpoint_set);
+
+ virtual int insert (const ACE_CString &endpoint);
+
+private:
+ TAO_EndpointSet &endpoints_;
+};
+
+// Utility class to insert preconnects into preconnect container.
+class TAO_Preconnect_Insertion_Strategy
+ : public TAO_Base_Endpoint_Insertion_Strategy
+{
+public:
+ TAO_Preconnect_Insertion_Strategy (TAO_PreconnectSet &preconnect_set);
+
+ virtual int insert (const ACE_CString &preconnect);
+
+private:
+ TAO_PreconnectSet &preconnects_;
+};
+// -------------------------------------------------------------------
+
class TAO_Export TAO_ORB_Parameters
// = TITLE
// Parameters that are specific to the ORB. These parameters can
@@ -56,7 +105,7 @@ public:
// Destructor.
int preconnects (ACE_CString &preconnects);
- TAO_EndpointSet &preconnects (void);
+ TAO_PreconnectSet &preconnects (void);
void add_preconnect (ACE_CString &preconnect);
// Specifies the endpoints to pre-establish connections on.
@@ -152,31 +201,37 @@ public:
private:
// Each "endpoint" is of the form:
//
- // protocol:V.v//addr1,addr2,...,addrN/
+ // protocol://V.v@addr1,...,W.w@addrN/
//
// or:
//
// protocol://addr1,addr2,...,addrN/
//
- // where "V.v" is an optional version.
+ // where "V.v" and "W.w" are optional versions.
//
- // Multiple sets of endpoint may be seperated by a semi-colon `;'.
+ // Multiple sets of endpoints may be seperated by a semi-colon `;'.
// For example:
//
- // iiop://space:2001,odyssey:2010/;uiop://foo,bar/
+ // iiop://space:2001,odyssey:2010;uiop://foo,bar
//
// All preconnect or endpoint strings should be of the above form(s).
int parse_endpoints (ACE_CString &endpoints,
- TAO_EndpointSet &endpoints_list);
+ TAO_Base_Endpoint_Insertion_Strategy &endpoints_list);
- TAO_EndpointSet preconnects_list_;
+ TAO_PreconnectSet preconnects_list_;
// List of endpoints used to pre-establish connections.
+ TAO_Preconnect_Insertion_Strategy preconnect_insertion_strategy_;
+ // Strategy used to insert endpoints into the endpoint container.
+
TAO_EndpointSet endpoints_list_;
// List of endpoints this server is willing to accept requests
// on.
+ TAO_Endpoint_Insertion_Strategy endpoint_insertion_strategy_;
+ // Strategy used to insert endpoints into the endpoint container.
+
ACE_CString name_service_ior_;
// The IOR of our configured Naming Service.