Thread_Lane_Resources_Manager.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    Thread_Lane_Resources_Manager.h
00006  *
00007  *  $Id: Thread_Lane_Resources_Manager.h 81429 2008-04-24 18:49:54Z johnnyw $
00008  *
00009  *  @author  Irfan Pyarali
00010  */
00011 // ============================================================================
00012 
00013 #ifndef TAO_THREAD_LANE_RESOURCES_MANAGER_H
00014 #define TAO_THREAD_LANE_RESOURCES_MANAGER_H
00015 
00016 #include /**/ "ace/pre.h"
00017 #include "ace/Service_Object.h"
00018 
00019 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00020 # pragma once
00021 #endif /* ACE_LACKS_PRAGMA_ONCE */
00022 
00023 #include /**/ "tao/TAO_Export.h"
00024 #include /**/ "tao/Versioned_Namespace.h"
00025 
00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00027 
00028 class TAO_ORB_Core;
00029 class TAO_Thread_Lane_Resources;
00030 class TAO_LF_Strategy;
00031 class TAO_MProfile;
00032 
00033 /**
00034  * @class TAO_Thread_Lane_Resources_Manager
00035  *
00036  * @brief This class is a manager for thread resources.
00037  *
00038  * \nosubgrouping
00039  *
00040  **/
00041 class TAO_Export TAO_Thread_Lane_Resources_Manager
00042 {
00043 public:
00044   /// Constructor.
00045   TAO_Thread_Lane_Resources_Manager (TAO_ORB_Core &orb_core);
00046 
00047   /// Destructor.
00048   virtual ~TAO_Thread_Lane_Resources_Manager (void);
00049 
00050   /// Finalize resources.
00051   virtual void finalize (void) = 0;
00052 
00053   /// Open default resources.
00054   virtual int open_default_resources (void) = 0;
00055 
00056   /// Shutdown reactor.
00057   virtual void shutdown_reactor (void) = 0;
00058 
00059   /// Cleanup transports that use the RW strategy since there are no
00060   /// ways to wake threads up waiting on those sockets.
00061   virtual void cleanup_rw_transports (void) = 0;
00062 
00063   /// Does @a mprofile belong to us?
00064   virtual int is_collocated (const TAO_MProfile& mprofile) = 0;
00065 
00066   /// @name Accessors
00067   // @{
00068   virtual TAO_Thread_Lane_Resources &lane_resources (void) = 0;
00069 
00070   virtual TAO_Thread_Lane_Resources &default_lane_resources (void) = 0;
00071 
00072   TAO_LF_Strategy &lf_strategy (void);
00073   // @}
00074 
00075 protected:
00076   /// The ORB Core.
00077   TAO_ORB_Core * const orb_core_;
00078 
00079   /// The leader follower strategy
00080   TAO_LF_Strategy *lf_strategy_;
00081 };
00082 
00083 /**
00084  * @class TAO_Thread_Lane_Resources_Manager_Factory
00085  *
00086  * @brief This class is a factory for managers of thread resources.
00087  *
00088  * \nosubgrouping
00089  *
00090  **/
00091 class TAO_Export TAO_Thread_Lane_Resources_Manager_Factory
00092   : public ACE_Service_Object
00093 {
00094 public:
00095 
00096   /// Virtual destructor.
00097   virtual ~TAO_Thread_Lane_Resources_Manager_Factory (void);
00098 
00099   /// Factory method.
00100   virtual TAO_Thread_Lane_Resources_Manager *
00101   create_thread_lane_resources_manager (TAO_ORB_Core &core) = 0;
00102 
00103 };
00104 
00105 TAO_END_VERSIONED_NAMESPACE_DECL
00106 
00107 
00108 #include /**/ "ace/post.h"
00109 
00110 #endif /* TAO_THREAD_LANE_RESOURCES_MANAGER_H */

Generated on Tue Feb 2 17:37:53 2010 for TAO by  doxygen 1.4.7