00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file Endpoint_Selector_Factory.h 00006 * 00007 * Endpoint_Selector_Factory.h,v 1.8 2005/11/02 07:13:02 ossama Exp 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 * @author Frank Hunleth <fhunleth@cs.wustl.edu> 00014 */ 00015 //============================================================================= 00016 00017 #ifndef TAO_ENDPOINT_SELECTOR_FACTORY_H 00018 #define TAO_ENDPOINT_SELECTOR_FACTORY_H 00019 00020 #include /**/ "ace/pre.h" 00021 00022 #include "tao/TAO_Export.h" 00023 00024 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00025 # pragma once 00026 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00027 00028 #include "tao/Versioned_Namespace.h" 00029 #include "ace/Service_Object.h" 00030 #include "ace/CORBA_macros.h" 00031 00032 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00033 00034 namespace CORBA 00035 { 00036 class Environment; 00037 00038 class Exception; 00039 } 00040 00041 class TAO_Invocation_Endpoint_Selector; 00042 00043 00044 // **************************************************************** 00045 00046 /** 00047 * @class TAO_Endpoint_Selector_Factory 00048 * 00049 * @brief Factory for initializing <Endpoint_Selection_State> and 00050 * obtaining appropriate <Invocation_Endpoint_Selector>. 00051 * 00052 * Used by Invocation classes to intialize its endpoint selection 00053 * strategy and state based on the effective policies. 00054 * Endpoint selection strategies are stateless objects - all the 00055 * state they need is contained by Invocation in 00056 * <Endpoint_Selection_State>. Thus, rather than allocating an 00057 * endpoint selection strategy object for each Invocation, the 00058 * factory simply returns the appropriate one from the 00059 * set preallocated in the ORB_Core. One endpoint selection 00060 * strategy object can be used by many invocations concurrently. 00061 */ 00062 class TAO_Export TAO_Endpoint_Selector_Factory 00063 : public ACE_Service_Object 00064 { 00065 public: 00066 /// Destructor. 00067 virtual ~TAO_Endpoint_Selector_Factory (void); 00068 00069 /// Get an Invocation's endpoint selection strategy and 00070 /// initialize the endpoint selection state instance. 00071 virtual TAO_Invocation_Endpoint_Selector *get_selector ( 00072 ACE_ENV_SINGLE_ARG_DECL) = 0; 00073 00074 00075 }; 00076 00077 TAO_END_VERSIONED_NAMESPACE_DECL 00078 00079 #include /**/ "ace/post.h" 00080 #endif /* TAO_ENDPOINT_SELECTOR_FACTORY_H */