Active_Policy_Strategies.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file Active_Policy_Strategies.h
00006  *
00007  *  $Id: Active_Policy_Strategies.h 80395 2008-01-08 10:16:50Z vzykov $
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/orbconf.h"
00019 
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 # pragma once
00022 #endif /* ACE_LACKS_PRAGMA_ONCE */
00023 
00024 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00025 
00026 class TAO_Root_POA;
00027 
00028 namespace TAO
00029 {
00030   namespace Portable_Server
00031   {
00032     class Cached_Policies;
00033     class ThreadStrategy;
00034     class RequestProcessingStrategy;
00035     class IdAssignmentStrategy;
00036     class LifespanStrategy;
00037     class IdUniquenessStrategy;
00038     class ImplicitActivationStrategy;
00039     class ServantRetentionStrategy;
00040 
00041     class ThreadStrategyFactory;
00042     class ServantRetentionStrategyFactory;
00043     class RequestProcessingStrategyFactory;
00044     class LifespanStrategyFactory;
00045     class ImplicitActivationStrategyFactory;
00046     class IdUniquenessStrategyFactory;
00047     class IdAssignmentStrategyFactory;
00048 
00049     /**
00050      * This class stores the active policy strategies used for a certain POA.
00051      */
00052     class Active_Policy_Strategies
00053     {
00054     public:
00055       Active_Policy_Strategies (void);
00056 
00057       void update (Cached_Policies &policies,
00058                    TAO_Root_POA* poa
00059                   );
00060 
00061       void cleanup (void);
00062 
00063       ThreadStrategy *thread_strategy (void) const;
00064 
00065       RequestProcessingStrategy *request_processing_strategy (void) const;
00066 
00067       IdAssignmentStrategy *id_assignment_strategy (void) const;
00068 
00069       IdUniquenessStrategy *id_uniqueness_strategy (void) const;
00070 
00071       LifespanStrategy *lifespan_strategy (void) const;
00072 
00073       ImplicitActivationStrategy *implicit_activation_strategy (void) const;
00074 
00075       ServantRetentionStrategy *servant_retention_strategy (void) const;
00076 
00077     private:
00078       ThreadStrategy *thread_strategy_;
00079       RequestProcessingStrategy *request_processing_strategy_;
00080       IdAssignmentStrategy *id_assignment_strategy_;
00081       LifespanStrategy *lifespan_strategy_;
00082       IdUniquenessStrategy *id_uniqueness_strategy_;
00083       ImplicitActivationStrategy *implicit_activation_strategy_;
00084       ServantRetentionStrategy *servant_retention_strategy_;
00085 
00086       ThreadStrategyFactory *thread_strategy_factory_;
00087       ServantRetentionStrategyFactory *servant_retention_strategy_factory_;
00088       RequestProcessingStrategyFactory *request_processing_strategy_factory_;
00089       LifespanStrategyFactory *lifespan_strategy_factory_;
00090       ImplicitActivationStrategyFactory *implicit_activation_strategy_factory_;
00091       IdUniquenessStrategyFactory *id_uniqueness_strategy_factory_;
00092       IdAssignmentStrategyFactory *id_assignment_strategy_factory_;
00093     };
00094 
00095     /**
00096      * This class quards the cleanup of strategies if something went wrong
00097      * in the code that called Active_Policy_Strategies::update().
00098      */
00099     class Active_Policy_Strategies_Cleanup_Guard
00100     {
00101     public:
00102       Active_Policy_Strategies_Cleanup_Guard (Active_Policy_Strategies *p);
00103       ~Active_Policy_Strategies_Cleanup_Guard (void);
00104 
00105       Active_Policy_Strategies *_retn (void);
00106 
00107     private:
00108       Active_Policy_Strategies *ptr_;
00109     };
00110   }
00111 }
00112 
00113 TAO_END_VERSIONED_NAMESPACE_DECL
00114 
00115 #if defined (__ACE_INLINE__)
00116 # include "tao/PortableServer/Active_Policy_Strategies.inl"
00117 #endif /* __ACE_INLINE__ */
00118 
00119 #include /**/ "ace/post.h"
00120 
00121 #endif /* TAO_PORTABLESERVER_ACTIVE_POLICY_STRATEGIES_H */

Generated on Tue Feb 2 17:40:54 2010 for TAO_PortableServer by  doxygen 1.4.7