00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file Active_Policy_Strategies.h 00006 * 00007 * Active_Policy_Strategies.h,v 1.4 2006/03/10 07:19:13 jtc Exp 00008 * 00009 * @author Johnny Willemsen <jwillemsen@remedy.nl> 00010 */ 00011 //============================================================================= 00012 00013 #ifndef TAO_PORTABLESERVER_ACTIVE_POLICY_STRATEGIES_H 00014 #define TAO_PORTABLESERVER_ACTIVE_POLICY_STRATEGIES_H 00015 00016 #include /**/ "ace/pre.h" 00017 00018 #include "tao/Environment.h" 00019 00020 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00021 # pragma once 00022 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00023 00024 #include "ace/CORBA_macros.h" 00025 00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00027 00028 class TAO_Root_POA; 00029 00030 namespace TAO 00031 { 00032 namespace Portable_Server 00033 { 00034 class Cached_Policies; 00035 class ThreadStrategy; 00036 class RequestProcessingStrategy; 00037 class IdAssignmentStrategy; 00038 class LifespanStrategy; 00039 class IdUniquenessStrategy; 00040 class ImplicitActivationStrategy; 00041 class ServantRetentionStrategy; 00042 00043 class ThreadStrategyFactory; 00044 class ServantRetentionStrategyFactory; 00045 class RequestProcessingStrategyFactory; 00046 class LifespanStrategyFactory; 00047 class ImplicitActivationStrategyFactory; 00048 class IdUniquenessStrategyFactory; 00049 class IdAssignmentStrategyFactory; 00050 00051 /** 00052 * This class stores the active policy strategies used for a certain POA. 00053 */ 00054 class Active_Policy_Strategies 00055 { 00056 public: 00057 Active_Policy_Strategies (void); 00058 00059 void update (Cached_Policies &policies, 00060 TAO_Root_POA* poa 00061 ACE_ENV_ARG_DECL); 00062 00063 void cleanup (ACE_ENV_SINGLE_ARG_DECL); 00064 00065 ThreadStrategy *thread_strategy (void) const; 00066 00067 RequestProcessingStrategy *request_processing_strategy (void) const; 00068 00069 IdAssignmentStrategy *id_assignment_strategy (void) const; 00070 00071 IdUniquenessStrategy *id_uniqueness_strategy (void) const; 00072 00073 LifespanStrategy *lifespan_strategy (void) const; 00074 00075 ImplicitActivationStrategy *implicit_activation_strategy (void) const; 00076 00077 ServantRetentionStrategy *servant_retention_strategy (void) const; 00078 00079 private: 00080 ThreadStrategy *thread_strategy_; 00081 RequestProcessingStrategy *request_processing_strategy_; 00082 IdAssignmentStrategy *id_assignment_strategy_; 00083 LifespanStrategy *lifespan_strategy_; 00084 IdUniquenessStrategy *id_uniqueness_strategy_; 00085 ImplicitActivationStrategy *implicit_activation_strategy_; 00086 ServantRetentionStrategy *servant_retention_strategy_; 00087 00088 ThreadStrategyFactory *thread_strategy_factory_; 00089 ServantRetentionStrategyFactory *servant_retention_strategy_factory_; 00090 RequestProcessingStrategyFactory *request_processing_strategy_factory_; 00091 LifespanStrategyFactory *lifespan_strategy_factory_; 00092 ImplicitActivationStrategyFactory *implicit_activation_strategy_factory_; 00093 IdUniquenessStrategyFactory *id_uniqueness_strategy_factory_; 00094 IdAssignmentStrategyFactory *id_assignment_strategy_factory_; 00095 }; 00096 } 00097 } 00098 00099 TAO_END_VERSIONED_NAMESPACE_DECL 00100 00101 #if defined (__ACE_INLINE__) 00102 # include "tao/PortableServer/Active_Policy_Strategies.inl" 00103 #endif /* __ACE_INLINE__ */ 00104 00105 #include /**/ "ace/post.h" 00106 00107 #endif /* TAO_PORTABLESERVER_ACTIVE_POLICY_STRATEGIES_H */