Public Member Functions | Private Types | Private Attributes

maci::MACIContainerServices Class Reference

#include <maciContainerServices.h>

Inheritance diagram for maci::MACIContainerServices:
Inheritance graph
[legend]
Collaboration diagram for maci::MACIContainerServices:
Collaboration graph
[legend]

List of all members.

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::ComponentStateManagergetComponentStateManager ()
acsalarm::AlarmSourcegetAlarmSource ()
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::ContainerImplm_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::ComponentStateManagercomponentStateManager_mp
 The component state manager.
acsalarm::AlarmSourcem_alarmSource
 The alarm source.

Detailed Description

The default implementation of the ContainerServices abstract class.


Member Typedef Documentation

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]

Constructor & Destructor Documentation

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


Member Function Documentation

ACS::OffShoot_ptr maci::MACIContainerServices::activateOffShoot ( PortableServer::Servant  cbServant  )  [virtual]

Activates a CORBA servant that implements the OffShoot interface.

Parameters:
cbServant the CORBA-generated servant, e.g. CBdoublePOA
Returns:
A reference to the OffShoot

Implements maci::ContainerServices.

PortableServer::POA_var maci::MACIContainerServices::createOffShootPOA (  )  [virtual]

Create the offshoot POA

Returns:
The newly created POA

Implements maci::ContainerServices.

void maci::MACIContainerServices::deactivateOffShoot ( PortableServer::Servant  cbServant  )  [virtual]

Deactivate the offshoot CORBA servant

Parameters:
cbServant the CORBA servant
Exceptions:
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.

Parameters:
nameWildcard (null is understood as "*")
typeWildcard (null is understood as "*")
Returns:
A vector of ACE_CString that contains the name of the component(s) that match the search.

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.

Returns:
the alarm source object owned by this Container Services
See also:
alma.ACS.ComponentStates

Implements maci::ContainerServices.

References m_alarmSource.

CDB::DAL_ptr maci::MACIContainerServices::getCDB (  )  [virtual]

Get a reference to the DAL object

Returns:
A reference to the DAL
Exceptions:
acsErrTypeContainerServices::CanNotGetCDBExImpl 

Implements maci::ContainerServices.

ComponentInfo maci::MACIContainerServices::getComponentDescriptor ( const char *  componentName  )  [virtual]

Gets the component info for the component

Parameters:
componentName The name of the component
Exceptions:
acsErrTypeContainerServices::GettingCompInfoExImpl 
Returns:
The ComponentInfo struct of the component

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.

Returns:
the state manager
See also:
alma.ACS.ComponentStates

Implements maci::ContainerServices.

CORBA::Object* maci::MACIContainerServices::getCORBACollocatedComponent ( maci::ComponentSpec  compSpec,
bool  markAsDefault,
const char *  targetComponent 
) [virtual]

Implementation of acsContainerServices::getCORBACollocatedComponent(...)

Exceptions:
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)

Exceptions:
maciErrType::CannotGetComponentExImpl 

Implements maci::ContainerServices.

CORBA::Object* maci::MACIContainerServices::getCORBAComponentNonSticky ( const char *  name  )  [virtual]

Implementation of acsContainerServices::getCORBAComponentNonSticky(const char* name)

Exceptions:
maciErrType::CannotGetComponentExImpl 

Implements maci::ContainerServices.

CORBA::Object* maci::MACIContainerServices::getCORBADefaultComponent ( const char *  idlType  )  [virtual]

Implementation of acsContainerServices::getCORBADefaultComponent(const char* name)

Exceptions:
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)

Exceptions:
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

Returns:
The offshoot POA

Implements maci::ContainerServices.

References m_offShootPOA.

void maci::MACIContainerServices::releaseAllComponents (  )  [virtual]

Release all the components

Returns:
void

Implements maci::ContainerServices.

void maci::MACIContainerServices::releaseComponent ( const char *  name  )  [virtual]

Releases the specified component.

Parameters:
The name of the component instance to be released
Exceptions:
maciErrType::CannotReleaseComponentExImpl 
Returns:
void

Implements maci::ContainerServices.

void maci::MACIContainerServices::releaseComponent ( std::string &  name,
ComponentReleaseCallback callback 
)

Releases the specified component.

Parameters:
name The name of the component instance to be released
callback 
Exceptions:
maciErrType::CannotReleaseComponentExImpl 
Returns:
void

void maci::MACIContainerServices::test ( const char *  txt  ) 

Member Data Documentation

The component state manager.

The alarm source.

Referenced by getAlarmSource().

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.


The documentation for this class was generated from the following file: