Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Strategies / Optimized_Connection_Endpoint_Selector.h
blob71bd45f5df95df77e8f562390149102e440a1f16
1 //=============================================================================
2 /**
3 * @file Optimized_Connection_Endpoint_Selector.h
5 * Strategies for selecting profile/endpoint from an IOR for making an
6 * invocation.
8 * @author Phil Mesnier <mesnier_p@ociweb.com>
9 */
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)
20 # 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;
31 class TAO_ORB_Core;
32 class TAO_Stub;
33 class TAO_Profile;
35 /**
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
48 public:
49 /// Constructor.
50 TAO_Optimized_Connection_Endpoint_Selector (const ACE_Time_Value& tv);
52 /// Destructor.
53 virtual ~TAO_Optimized_Connection_Endpoint_Selector ();
55 static void hook (TAO_ORB_Core *,
56 TAO_Stub *,
57 bool &has_timeout,
58 ACE_Time_Value &tv);
60 virtual void select_endpoint (TAO::Profile_Transport_Resolver *,
61 ACE_Time_Value *max_wait_time);
62 private:
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 */