Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

maciContainerServices.h

Go to the documentation of this file.
00001 #ifndef maciContainerServices_h 00002 #define maciContainerServices_h 00003 /******************************************************************************* 00004 * ALMA - Atacama Large Millimiter Array 00005 * (c) European Southern Observatory, 2002 00006 * Copyright by ESO (in the framework of the ALMA collaboration) 00007 * and Cosylab 2002, All rights reserved 00008 * 00009 * This library is free software; you can redistribute it and/or 00010 * modify it under the terms of the GNU Lesser General Public 00011 * License as published by the Free Software Foundation; either 00012 * version 2.1 of the License, or (at your option) any later version. 00013 * 00014 * This library is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 * Lesser General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU Lesser General Public 00020 * License along with this library; if not, write to the Free Software 00021 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00022 * 00023 * 00024 * "@(#) $Id: maciContainerServices.h,v 1.30 2008/10/09 07:05:37 cparedes Exp $" 00025 * 00026 * who when what 00027 * -------- -------- ---------------------------------------------- 00028 * rcirami 27/11/03 created 00029 */ 00030 00031 #include <acsutil.h> 00032 #include <acsContainerServices.h> 00033 #include <maciComponentStateManager.h> 00034 #include <acscomponentImpl.h> 00035 #include <logging.h> 00036 #include <maciContainerImpl.h> 00037 #include <cdbDALS.h> 00038 #include <acscomponentS.h> 00039 #include <acsErrTypeContainerServices.h> 00040 #include <acsErrTypeLifeCycle.h> 00041 #include <vector> 00042 #include <string> 00043 #include <iterator> 00044 00045 #include <ace/Synch.h> 00046 #include <ace/Hash_Map_Manager.h> 00047 00048 namespace maci { 00049 00050 class ContainerImpl; 00051 00055 class MACIContainerServices: public ContainerServices 00056 00057 { 00058 public: 00059 00063 MACIContainerServices( 00064 const maci::Handle componentHandle, 00065 ACE_CString& name, 00066 PortableServer::POA_ptr poa); 00067 00071 virtual ~MACIContainerServices(); 00072 00073 public: 00074 00075 void test(const char* txt); 00080 CORBA::Object* getCORBAComponent(const char* name); 00081 00086 CORBA::Object* getCORBAComponentNonSticky(const char* name); 00087 00096 CORBA::Object* getCORBADynamicComponent(maci::ComponentSpec compSpec, bool markAsDefault); 00097 00106 CORBA::Object* getCORBACollocatedComponent(maci::ComponentSpec compSpec, bool markAsDefault, const char* targetComponent); 00107 00114 CORBA::Object* getCORBADefaultComponent(const char* idlType); 00115 00116 public: 00117 00125 ComponentInfo getComponentDescriptor(const char* componentName); 00126 00141 ACE_CString_Vector findComponents(const char *nameWilcard, const char *typeWildcard); 00142 00153 void releaseComponent(const char *name); 00154 00160 void releaseAllComponents(); 00161 00171 CDB::DAL_ptr getCDB(); 00172 00175 PortableServer::POA_var getOffShootPOA() { return m_offShootPOA; } 00176 00186 ACS::OffShoot_ptr activateOffShoot(PortableServer::Servant cbServant); 00187 00194 void deactivateOffShoot(PortableServer::Servant cbServant); 00195 00200 PortableServer::POA_var createOffShootPOA(); 00201 00215 maci::ComponentStateManager* getComponentStateManager(); 00216 00217 void fireComponentsUnavailable(ACE_CString_Vector& compNames); 00218 void fireComponentsAvailable(ACE_CString_Vector& compNames); 00219 00220 private: 00221 00223 maci::Manager_var m_manager; 00224 00226 maci::ContainerImpl *m_containerImpl; 00227 00229 PortableServer::POA_var m_offShootPOA; 00230 00232 maci::Handle m_componentHandle; 00233 00235 typedef ACE_Hash_Map_Manager <ACE_CString, maci::Handle, ACE_Recursive_Thread_Mutex> COMPONENT_HASH_MAP; 00236 typedef ACE_Hash_Map_Iterator <ACE_CString, maci::Handle, ACE_Recursive_Thread_Mutex> COMPONENT_HASH_MAP_ITER; 00237 typedef ACE_Hash_Map_Entry <ACE_CString, maci::Handle> COMPONENT_HASH_MAP_ENTRY; 00238 00240 COMPONENT_HASH_MAP m_usedComponents; 00241 00243 maci::ComponentStateManager* componentStateManager_mp; 00244 }; 00245 00246 } // end namespace maci 00247 00248 #endif // maciContainerServices_h 00249

Generated on Thu Apr 30 02:30:51 2009 for ACS C++ API by doxygen 1.3.8