1 //=============================================================================
3 * @file Optimized_Connection_Endpoint_Selector.h
5 * Strategies for selecting profile/endpoint from an IOR for making an
8 * @author Phil Mesnier <mesnier_p@ociweb.com>
10 //=============================================================================
12 #ifndef TAO_OPTIMIZED_CONNECTION_ENDPOINT_SELECTOR_H
13 #define TAO_OPTIMIZED_CONNECTION_ENDPOINT_SELECTOR_H
15 #include /**/ "ace/pre.h"
17 #include "tao/corbafwd.h"
19 #if !defined (ACE_LACKS_PRAGMA_ONCE)
21 #endif /* ACE_LACKS_PRAGMA_ONCE */
23 #include "tao/Strategies/strategies_export.h"
25 #include "tao/Invocation_Endpoint_Selectors.h"
26 #include "ace/Time_Value.h"
28 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
30 class TAO_GIOP_Invocation
;
36 * @class TAO_Optimized_Connection_Endpoint_Selector
38 * @brief More efficient connection strategy for endpoint selection.
40 * This strategy builds on the default by first querying the connection
41 * cache for all potential endpoints before iterating over the list to
42 * attempt to create new connections.
45 class TAO_Strategies_Export TAO_Optimized_Connection_Endpoint_Selector
46 : public TAO_Default_Endpoint_Selector
50 TAO_Optimized_Connection_Endpoint_Selector (const ACE_Time_Value
& tv
);
53 virtual ~TAO_Optimized_Connection_Endpoint_Selector ();
55 static void hook (TAO_ORB_Core
*,
60 virtual void select_endpoint (TAO::Profile_Transport_Resolver
*,
61 ACE_Time_Value
*max_wait_time
);
63 int check_profile (TAO_Profile
*,
64 TAO::Profile_Transport_Resolver
*);
66 static ACE_Time_Value timeout_
;
69 TAO_END_VERSIONED_NAMESPACE_DECL
71 #include /**/ "ace/post.h"
72 #endif /* TAO_OPTIMIZED_CONNECTION_ENDPOINT_SELECTOR_H */