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 76995 2007-02-11 12:51:42Z 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 
00045   /// Constructor.
00046   TAO_Thread_Lane_Resources_Manager (TAO_ORB_Core &orb_core);
00047 
00048   /// Destructor.
00049   virtual ~TAO_Thread_Lane_Resources_Manager (void);
00050 
00051   /// Finalize resources.
00052   virtual void finalize (void) = 0;
00053 
00054   /// Open default resources.
00055   virtual int open_default_resources (void) = 0;
00056 
00057   /// Shutdown reactor.
00058   virtual void shutdown_reactor (void) = 0;
00059 
00060   /// Cleanup transports that use the RW strategy since there are no
00061   /// ways to wake threads up waiting on those sockets.
00062   virtual void cleanup_rw_transports (void) = 0;
00063 
00064   /// Does @a mprofile belong to us?
00065   virtual int is_collocated (const TAO_MProfile& mprofile) = 0;
00066 
00067   /// @name Accessors
00068   // @{
00069 
00070   virtual TAO_Thread_Lane_Resources &lane_resources (void) = 0;
00071 
00072   virtual TAO_Thread_Lane_Resources &default_lane_resources (void) = 0;
00073 
00074   TAO_LF_Strategy &lf_strategy (void);
00075 
00076   // @}
00077 
00078 protected:
00079   /// The ORB Core.
00080   TAO_ORB_Core * const orb_core_;
00081 
00082   /// The leader follower strategy
00083   TAO_LF_Strategy *lf_strategy_;
00084 };
00085 
00086 /**
00087  * @class TAO_Thread_Lane_Resources_Manager_Factory
00088  *
00089  * @brief This class is a factory for managers of thread resources.
00090  *
00091  * \nosubgrouping
00092  *
00093  **/
00094 class TAO_Export TAO_Thread_Lane_Resources_Manager_Factory
00095   : public ACE_Service_Object
00096 {
00097 public:
00098 
00099   /// Virtual destructor.
00100   virtual ~TAO_Thread_Lane_Resources_Manager_Factory (void);
00101 
00102   /// Factory method.
00103   virtual TAO_Thread_Lane_Resources_Manager *
00104   create_thread_lane_resources_manager (TAO_ORB_Core &core) = 0;
00105 
00106 };
00107 
00108 TAO_END_VERSIONED_NAMESPACE_DECL
00109 
00110 
00111 #include /**/ "ace/post.h"
00112 
00113 #endif /* TAO_THREAD_LANE_RESOURCES_MANAGER_H */

Generated on Sun Jan 27 13:07:37 2008 for TAO by doxygen 1.3.6