Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / Default_Endpoint_Selector_Factory.h
blob3c947763ea1ae4175fbcb7dbabd3ab6bbff87b15
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Default_Endpoint_Selector_Factory.h
7 * Strategies for selecting profile/endpoint from an IOR for making an
8 * invocation.
10 * @author Marina Spivak <marina@cs.wustl.edu>
11 * @author Frank Hunleth <fhunleth@cs.wustl.edu>
13 //=============================================================================
15 #ifndef TAO_DEFAULT_ENDPOINT_SELECTOR_FACTORY_H
16 #define TAO_DEFAULT_ENDPOINT_SELECTOR_FACTORY_H
18 #include /**/ "ace/pre.h"
19 #include "ace/Service_Config.h"
21 #if !defined (ACE_LACKS_PRAGMA_ONCE)
22 # pragma once
23 #endif /* ACE_LACKS_PRAGMA_ONCE */
25 #include "tao/Endpoint_Selector_Factory.h"
27 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
29 // Forward references
30 class TAO_Default_Endpoint_Selector;
32 // ****************************************************************
34 /**
35 * @class TAO_Default_Endpoint_Selector_Factory
37 * @brief Factory for initializing <Endpoint_Selection_State> and
38 * obtaining appropriate <Invocation_Endpoint_Selector>.
40 * Used by Invocation classes to initialize its endpoint selection
41 * strategy and state based on the effective policies.
42 * Endpoint selection strategies are stateless objects - all the
43 * state they need is contained by Invocation in
44 * <Endpoint_Selection_State>. Thus, rather than allocating an
45 * endpoint selection strategy object for each Invocation, the
46 * factory simply returns the appropriate one from the
47 * set preallocated in the ORB_Core. One endpoint selection
48 * strategy object can be used by many invocations concurrently.
50 class TAO_Export TAO_Default_Endpoint_Selector_Factory
51 : public TAO_Endpoint_Selector_Factory
53 public:
54 /// Constructor.
55 TAO_Default_Endpoint_Selector_Factory ();
57 /// Destructor.
58 virtual ~TAO_Default_Endpoint_Selector_Factory ();
60 /// Get an Invocation's endpoint selection strategy and
61 /// initialize the endpoint selection state instance.
62 virtual TAO_Invocation_Endpoint_Selector *get_selector ();
64 private:
65 // Prevent copying/assignment.
66 TAO_Default_Endpoint_Selector_Factory (TAO_Default_Endpoint_Selector_Factory const &);
67 void operator= (TAO_Default_Endpoint_Selector_Factory const &);
69 protected:
70 /// The possible endpoint selector strategies that can be
71 /// returned by this factory
72 TAO_Default_Endpoint_Selector * const default_endpoint_selector_;
75 ACE_STATIC_SVC_DECLARE_EXPORT (TAO, TAO_Default_Endpoint_Selector_Factory)
76 ACE_FACTORY_DECLARE (TAO, TAO_Default_Endpoint_Selector_Factory)
78 TAO_END_VERSIONED_NAMESPACE_DECL
80 #include /**/ "ace/post.h"
81 #endif /* TAO_DEFAULT_ENDPOINT_SELECTOR_FACTORY_H */