00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file RT_Endpoint_Selector_Factory.h 00006 * 00007 * $Id: RT_Endpoint_Selector_Factory.h 79221 2007-08-06 11:01:22Z johnnyw $ 00008 * 00009 * Strategies for selecting profile/endpoint from an IOR for making an 00010 * invocation. 00011 * 00012 * @author Marina Spivak <marina@cs.wustl.edu> 00013 */ 00014 //============================================================================= 00015 00016 00017 #ifndef RT_ENDPOINT_SELECTOR_FACTORY_H 00018 #define RT_ENDPOINT_SELECTOR_FACTORY_H 00019 #include /**/ "ace/pre.h" 00020 00021 #include "tao/orbconf.h" 00022 00023 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00024 # pragma once 00025 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00026 00027 #if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0 00028 00029 #include "tao/RTCORBA/rtcorba_export.h" 00030 #include "tao/Endpoint_Selector_Factory.h" 00031 #include "ace/Service_Config.h" 00032 00033 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00034 00035 class TAO_RT_Invocation_Endpoint_Selector; 00036 00037 // **************************************************************** 00038 /** 00039 * @class RT_Endpoint_Selector_Factory 00040 * 00041 * @brief Factory for obtaining appropriate <Invocation_Selector>. 00042 * 00043 * Used by Invocation classes to intialize its endpoint selection 00044 * strategy and state based on the effective policies. Endpoint 00045 * selection strategies are stateless objects - all the state they 00046 * need is contained by Invocation. Thus, rather than allocating an 00047 * endpoint selection strategy object for each Invocation, the factory 00048 * simply returns the appropriate one from the set preallocated in the 00049 * ORB_Core. One endpoint selection strategy object can be used by 00050 * many invocations concurrently. 00051 */ 00052 class TAO_RTCORBA_Export RT_Endpoint_Selector_Factory 00053 : public TAO_Endpoint_Selector_Factory 00054 { 00055 public: 00056 /// Constructor. 00057 RT_Endpoint_Selector_Factory (void); 00058 00059 /// Destructor. 00060 virtual ~RT_Endpoint_Selector_Factory (void); 00061 00062 virtual TAO_Invocation_Endpoint_Selector *get_selector (void); 00063 00064 private: 00065 TAO_RT_Invocation_Endpoint_Selector *rt_invocation_endpoint_selector_; 00066 }; 00067 00068 TAO_END_VERSIONED_NAMESPACE_DECL 00069 00070 ACE_STATIC_SVC_DECLARE_EXPORT (TAO_RTCORBA, RT_Endpoint_Selector_Factory) 00071 ACE_FACTORY_DECLARE (TAO_RTCORBA, RT_Endpoint_Selector_Factory) 00072 00073 #endif /* TAO_HAS_CORBA_MESSAGING && TAO_HAS_CORBA_MESSAGING != 0 */ 00074 00075 #include /**/ "ace/post.h" 00076 #endif /* RT_ENDPOINT_SELECTOR_FACTORY_H */