Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tao / Invocation_Endpoint_Selectors.h
blob2d876183efeae24f1a461618c3e17e607838499c
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Invocation_Endpoint_Selectors.h
7 * Strategies for selecting profile/endpoint from an IOR for making an
8 * invocation.
10 * @author Marina Spivak <marina@cs.wustl.edu>
12 //=============================================================================
14 #ifndef TAO_INVOCATION_ENDPOINT_SELECTOR_H
15 #define TAO_INVOCATION_ENDPOINT_SELECTOR_H
17 #include /**/ "ace/pre.h"
19 #include /**/ "tao/TAO_Export.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 # pragma once
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
25 #include /**/ "tao/Versioned_Namespace.h"
27 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
28 class ACE_Time_Value;
29 ACE_END_VERSIONED_NAMESPACE_DECL
31 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
33 class TAO_MProfile;
35 namespace TAO
37 class Profile_Transport_Resolver;
40 namespace CORBA
42 class Exception;
44 /**
45 * @class TAO_Invocation_Endpoint_Selector
47 * @brief Defines the interface for policy-based endpoint selection
48 * strategies.
50 * Selects/reselects server endpoint for an Invocation. Different
51 * concrete strategies perform selection based on different
52 * policies.
53 * @par
54 * All endpoint selection strategies are stateless objects - any
55 * necessary state is stored in Invocation's
56 * @c endpoint_selection_state_.
58 class TAO_Export TAO_Invocation_Endpoint_Selector
60 public:
61 /// Destructor.
62 virtual ~TAO_Invocation_Endpoint_Selector ();
64 /// Select the endpoint and set @a r's @c profile_
65 virtual void select_endpoint (TAO::Profile_Transport_Resolver *r,
66 ACE_Time_Value *val) = 0;
69 // ****************************************************************
71 /**
72 * @class TAO_Default_Endpoint_Selector
74 * @brief Default strategy for endpoint selection.
76 * This strategy is used when there are no policies set or when
77 * the only policy set is RTCORBA::PriorityModelPolicy and its
78 * value is RTCORBA::SERVER_DECLARED.
79 * The strategy is to try the first endpoint from the first
80 * profile in the IOR. If that doesn't work, try the next
81 * profile, and so on.
83 class TAO_Export TAO_Default_Endpoint_Selector
84 : public TAO_Invocation_Endpoint_Selector
86 public:
87 /// Destructor.
88 virtual ~TAO_Default_Endpoint_Selector ();
90 virtual void select_endpoint (TAO::Profile_Transport_Resolver *r,
91 ACE_Time_Value *val);
94 TAO_END_VERSIONED_NAMESPACE_DECL
96 #include /**/ "ace/post.h"
98 #endif /* TAO_INVOCATION_ENDPOINT_SELECTOR_H */