#include <maciContainerServices.h>
Public Member Functions | |
MACIContainerServices (const maci::Handle componentHandle, ACE_CString &name, ACE_CString &type, PortableServer::POA_ptr poa) | |
MACIContainerServices (const maci::Handle componentHandle, ACE_CString &name, PortableServer::POA_ptr poa, Manager_ptr manager) | |
virtual | ~MACIContainerServices () |
void | test (const char *txt) |
CORBA::Object * | getCORBAComponent (const char *name) |
CORBA::Object * | getCORBAComponentNonSticky (const char *name) |
CORBA::Object * | getCORBADynamicComponent (maci::ComponentSpec compSpec, bool markAsDefault) |
CORBA::Object * | getCORBACollocatedComponent (maci::ComponentSpec compSpec, bool markAsDefault, const char *targetComponent) |
CORBA::Object * | getCORBADefaultComponent (const char *idlType) |
ComponentInfo | getComponentDescriptor (const char *componentName) |
ACE_CString_Vector | findComponents (const char *nameWilcard, const char *typeWildcard) |
void | releaseComponent (const char *name) |
void | releaseComponent (std::string &name, ComponentReleaseCallback *callback) |
void | releaseAllComponents () |
CDB::DAL_ptr | getCDB () |
PortableServer::POA_var | getOffShootPOA () |
ACS::OffShoot_ptr | activateOffShoot (PortableServer::Servant cbServant) |
void | deactivateOffShoot (PortableServer::Servant cbServant) |
PortableServer::POA_var | createOffShootPOA () |
maci::ComponentStateManager * | getComponentStateManager () |
acsalarm::AlarmSource * | getAlarmSource () |
void | fireComponentsUnavailable (ACE_CString_Vector &compNames) |
void | fireComponentsAvailable (ACE_CString_Vector &compNames) |
Private Types | |
typedef ACE_Hash_Map_Manager < ACE_CString, maci::Handle, ACE_Recursive_Thread_Mutex > | COMPONENT_HASH_MAP |
Component hash map (used as hash set, value is owner handle). | |
typedef ACE_Hash_Map_Iterator < ACE_CString, maci::Handle, ACE_Recursive_Thread_Mutex > | COMPONENT_HASH_MAP_ITER |
typedef ACE_Hash_Map_Entry < ACE_CString, maci::Handle > | COMPONENT_HASH_MAP_ENTRY |
Private Attributes | |
maci::Manager_var | m_manager |
Reference to the manager. | |
maci::ContainerImpl * | m_containerImpl |
Pointer to the container. | |
PortableServer::POA_var | m_offShootPOA |
The POA for the offshoot. | |
maci::Handle | m_componentHandle |
Component handle. | |
COMPONENT_HASH_MAP | m_usedComponents |
Map (used as set) of activated components. | |
maci::ComponentStateManager * | componentStateManager_mp |
The component state manager. | |
acsalarm::AlarmSource * | m_alarmSource |
The alarm source. |
The default implementation of the ContainerServices abstract class.
typedef ACE_Hash_Map_Manager<ACE_CString, maci::Handle, ACE_Recursive_Thread_Mutex> maci::MACIContainerServices::COMPONENT_HASH_MAP [private] |
Component hash map (used as hash set, value is owner handle).
typedef ACE_Hash_Map_Entry<ACE_CString, maci::Handle> maci::MACIContainerServices::COMPONENT_HASH_MAP_ENTRY [private] |
typedef ACE_Hash_Map_Iterator<ACE_CString, maci::Handle, ACE_Recursive_Thread_Mutex> maci::MACIContainerServices::COMPONENT_HASH_MAP_ITER [private] |
maci::MACIContainerServices::MACIContainerServices | ( | const maci::Handle | componentHandle, | |
ACE_CString & | name, | |||
ACE_CString & | type, | |||
PortableServer::POA_ptr | poa | |||
) |
Constructor to be used in Container instances
maci::MACIContainerServices::MACIContainerServices | ( | const maci::Handle | componentHandle, | |
ACE_CString & | name, | |||
PortableServer::POA_ptr | poa, | |||
Manager_ptr | manager | |||
) |
Constructor to be used in client instances
virtual maci::MACIContainerServices::~MACIContainerServices | ( | ) | [virtual] |
Destructor
ACS::OffShoot_ptr maci::MACIContainerServices::activateOffShoot | ( | PortableServer::Servant | cbServant | ) | [virtual] |
Activates a CORBA servant that implements the OffShoot interface.
cbServant | the CORBA-generated servant, e.g. CBdoublePOA |
Implements maci::ContainerServices.
PortableServer::POA_var maci::MACIContainerServices::createOffShootPOA | ( | ) | [virtual] |
void maci::MACIContainerServices::deactivateOffShoot | ( | PortableServer::Servant | cbServant | ) | [virtual] |
Deactivate the offshoot CORBA servant
cbServant | the CORBA servant |
acsErrTypeContainerServices::OffShootDeactivationExImpl | ||
acsErrTypeContainerServices::OffShootPOAExImpl |
Implements maci::ContainerServices.
ACE_CString_Vector maci::MACIContainerServices::findComponents | ( | const char * | nameWilcard, | |
const char * | typeWildcard | |||
) | [virtual] |
Finds components by their instance name (curl) and/or by their type. Wildcards can be used for the curl and type. This method returns a possibly empty array of component curls; for each curl, you may use getComponent to obtain the reference.
nameWildcard | (null is understood as "*") | |
typeWildcard | (null is understood as "*") |
Implements maci::ContainerServices.
void maci::MACIContainerServices::fireComponentsAvailable | ( | ACE_CString_Vector & | compNames | ) |
Reimplemented from maci::ContainerServices.
void maci::MACIContainerServices::fireComponentsUnavailable | ( | ACE_CString_Vector & | compNames | ) |
Reimplemented from maci::ContainerServices.
acsalarm::AlarmSource* maci::MACIContainerServices::getAlarmSource | ( | ) | [inline, virtual] |
Returns a pointer to the AlarmSource
object used to send alarms in a smart way.
Implements maci::ContainerServices.
References m_alarmSource.
CDB::DAL_ptr maci::MACIContainerServices::getCDB | ( | ) | [virtual] |
Get a reference to the DAL object
acsErrTypeContainerServices::CanNotGetCDBExImpl |
|
Implements maci::ContainerServices.
ComponentInfo maci::MACIContainerServices::getComponentDescriptor | ( | const char * | componentName | ) | [virtual] |
Gets the component info for the component
componentName | The name of the component |
acsErrTypeContainerServices::GettingCompInfoExImpl |
Implements maci::ContainerServices.
maci::ComponentStateManager* maci::MACIContainerServices::getComponentStateManager | ( | ) | [virtual] |
Returns a pointer to the ComponentStateManager
through which the component and the container administrate the state of the component.
The component needs to access the ComponentStateManager
if it wishes to change its state. If it doesn't, only the container will change the state based on the information it has available.
Implements maci::ContainerServices.
CORBA::Object* maci::MACIContainerServices::getCORBACollocatedComponent | ( | maci::ComponentSpec | compSpec, | |
bool | markAsDefault, | |||
const char * | targetComponent | |||
) | [virtual] |
Implementation of acsContainerServices::getCORBACollocatedComponent(...)
maciErrType::NoPermissionExImpl | ||
maciErrType::IncompleteComponentSpecExImpl | ||
maciErrType::InvalidComponentSpecExImpl | ||
maciErrType::ComponentSpecIncompatibleWithActiveComponentExImpl | ||
maciErrType::CannotGetComponentExImpl |
Implements maci::ContainerServices.
CORBA::Object* maci::MACIContainerServices::getCORBAComponent | ( | const char * | name | ) | [virtual] |
Implementation of acsContainerServices::getCORBAComponent(const char* name)
maciErrType::CannotGetComponentExImpl |
Implements maci::ContainerServices.
CORBA::Object* maci::MACIContainerServices::getCORBAComponentNonSticky | ( | const char * | name | ) | [virtual] |
Implementation of acsContainerServices::getCORBAComponentNonSticky(const char* name)
maciErrType::CannotGetComponentExImpl |
Implements maci::ContainerServices.
CORBA::Object* maci::MACIContainerServices::getCORBADefaultComponent | ( | const char * | idlType | ) | [virtual] |
Implementation of acsContainerServices::getCORBADefaultComponent(const char* name)
maciErrType::NoPermissionExImpl | ||
maciErrType::CannotGetComponentExImpl | ||
maciErrType::NoDefaultComponentExImpl |
Implements maci::ContainerServices.
CORBA::Object* maci::MACIContainerServices::getCORBADynamicComponent | ( | maci::ComponentSpec | compSpec, | |
bool | markAsDefault | |||
) | [virtual] |
Implementation of acsContainerServices::getCORBADynamicComponent(const char* name)
maciErrType::NoPermissionExImpl | ||
maciErrType::IncompleteComponentSpecExImpl | ||
maciErrType::InvalidComponentSpecExImpl | ||
maciErrType::ComponentSpecIncompatibleWithActiveComponentExImpl | ||
maciErrType::CannotGetComponentExImpl |
Implements maci::ContainerServices.
PortableServer::POA_var maci::MACIContainerServices::getOffShootPOA | ( | ) | [inline, virtual] |
Get the OffShoot POA
Implements maci::ContainerServices.
References m_offShootPOA.
void maci::MACIContainerServices::releaseAllComponents | ( | ) | [virtual] |
void maci::MACIContainerServices::releaseComponent | ( | const char * | name | ) | [virtual] |
Releases the specified component.
The | name of the component instance to be released |
maciErrType::CannotReleaseComponentExImpl |
Implements maci::ContainerServices.
void maci::MACIContainerServices::releaseComponent | ( | std::string & | name, | |
ComponentReleaseCallback * | callback | |||
) |
Releases the specified component.
name | The name of the component instance to be released | |
callback |
maciErrType::CannotReleaseComponentExImpl |
void maci::MACIContainerServices::test | ( | const char * | txt | ) |
The component state manager.
The alarm source.
Referenced by getAlarmSource().
maci::Handle maci::MACIContainerServices::m_componentHandle [private] |
Component handle.
Pointer to the container.
maci::Manager_var maci::MACIContainerServices::m_manager [private] |
Reference to the manager.
PortableServer::POA_var maci::MACIContainerServices::m_offShootPOA [private] |
The POA for the offshoot.
Referenced by getOffShootPOA().
Map (used as set) of activated components.