maci::ContainerServices

NAME
SYNOPSIS
Detailed Description
Constructor & Destructor Documentation
Member Function Documentation
Member Data Documentation
Author

NAME

maci::ContainerServices −

SYNOPSIS

#include <acsContainerServices.h>

Inherits Logging::Loggable.

Inherited by maci::MACIContainerServices, maci::MockContainerServices, StaticContainerServices, and TestContainerServices [virtual].

Public Member Functions

ContainerServices (ACE_CString &compName, PortableServer::POA_ptr poa)

virtual ~ContainerServices ()

ACE_CString getName ()

ACE_CString getType ()

PortableServer::POA_var getPOA ()

void registerComponentListener (ComponentListener *listener)

void fireComponentsUnavailable (ACE_CString_Vector &compNames)

void fireComponentsAvailable (ACE_CString_Vector &compNames)

template<class T > T * getComponent (const char *name)

template<class T > T * getComponentNonSticky (const char *name)

template<class T > T * getDynamicComponent (maci::ComponentSpec compSpec, bool markAsDefault)

template<class T > T * getCollocatedComponent (maci::ComponentSpec compSpec, bool markAsDefault, const char *targetComponent)

template<class T > T * getDefaultComponent (const char *idlType)

template<typename T > SmartPtr< T > getComponentSmartPtr (const char *name)

template<typename T > SmartPtr< T > getComponentNonStickySmartPtr (const char *name)

template<typename T > SmartPtr< T > getDynamicComponentSmartPtr (maci::ComponentSpec compSpec, bool markAsDefault)

template<typename T > SmartPtr< T > getCollocatedComponentSmartPtr (maci::ComponentSpec compSpec, bool markAsDefault, const char *targetComponent)

template<typename T > SmartPtr< T > getDefaultComponentSmartPtr (const char *idlType)

virtual maci::ComponentInfo getComponentDescriptor (const char *componentName)=0

virtual ACE_CString_Vector findComponents (const char *nameWilcard, const char *typeWildcard)=0

virtual void releaseComponent (const char *name)=0

virtual void releaseAllComponents ()=0

virtual CDB::DAL_ptr getCDB ()=0

virtual PortableServer::POA_var getOffShootPOA ()=0

virtual ACS::OffShoot_ptr activateOffShoot (PortableServer::Servant cbServant)=0

virtual void deactivateOffShoot (PortableServer::Servant cbServant)=0

virtual PortableServer::POA_var createOffShootPOA ()=0

virtual ComponentStateManager * getComponentStateManager ()=0

virtual acsalarm::AlarmSource * getAlarmSource ()=0

virtual ACS::ThreadManager * getThreadManager ()

Protected Member Functions

virtual CORBA::Object * getCORBAComponent (const char *name)=0

virtual CORBA::Object * getCORBAComponentNonSticky (const char *name)=0

virtual CORBA::Object * getCORBADynamicComponent (maci::ComponentSpec compSpec, bool markAsDefault)=0

virtual CORBA::Object * getCORBACollocatedComponent (maci::ComponentSpec compSpec, bool markAsDefault, const char *targetComponent)=0

virtual CORBA::Object * getCORBADefaultComponent (const char *idlType)=0

Protected Attributes

ACE_CString m_componentName

ACE_CString m_componentType

ComponentListener * compListener

bool withCompListener

PortableServer::POA_var m_poa

ACS::ThreadManager threadManager_m

Detailed Description

Specializing this class, the container offers services to its hosted components. The component must call these methods explicitly; in this respect, ContainerServices is different from the other services that the container provides without the component implementation knowing about it. It can be thought of as a callback handle or a library. Currently, methods are added to this interface as the functionality becomes available.

Constructor & Destructor Documentation

maci::ContainerServices::ContainerServices (ACE_CString & compName, PortableServer::POA_ptr poa) Constructor

Parameters:

componentName The name of the component
poa
The POA

virtual maci::ContainerServices::~ContainerServices () [virtual] Destructor

Member Function Documentation

virtual ACS::OffShoot_ptr maci::ContainerServices::activateOffShoot (PortableServer::Servant cbServant) [pure 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

Implemented in TestContainerServices, maci::MACIContainerServices, and StaticContainerServices.

virtual PortableServer::POA_var maci::ContainerServices::createOffShootPOA () [pure virtual] Create the offshoot POA

Returns:

The newly created POA

Implemented in maci::MockContainerServices, TestContainerServices, maci::MACIContainerServices, and StaticContainerServices.

virtual void maci::ContainerServices::deactivateOffShoot (PortableServer::Servant cbServant) [pure virtual] Deactivate the offshoot CORBA servant

Parameters:

cbServant the CORBA servant

Exceptions:

acsErrTypeContainerServices::OffShootDeactivationExImpl
acsErrTypeContainerServices::OffShootPOAExImpl

Implemented in TestContainerServices, maci::MACIContainerServices, and StaticContainerServices.

virtual ACE_CString_Vector maci::ContainerServices::findComponents (const char * nameWilcard, const char * typeWildcard) [pure 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.

Implemented in maci::MockContainerServices, TestContainerServices, maci::MACIContainerServices, and StaticContainerServices.

void maci::ContainerServices::fireComponentsAvailable (ACE_CString_Vector & compNames)

Reimplemented in maci::MACIContainerServices.

void maci::ContainerServices::fireComponentsUnavailable (ACE_CString_Vector & compNames)

Reimplemented in maci::MACIContainerServices.

virtual acsalarm::AlarmSource* maci::ContainerServices::getAlarmSource () [pure 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

Implemented in maci::MockContainerServices, TestContainerServices, maci::MACIContainerServices, and StaticContainerServices.

virtual CDB::DAL_ptr maci::ContainerServices::getCDB () [pure virtual] Get a reference to the DAL object

Exceptions:

acsErrTypeContainerServices::CanNotGetCDBExImpl

Returns:

A reference to the DAL

Implemented in maci::MockContainerServices, TestContainerServices, maci::MACIContainerServices, and StaticContainerServices.

template<class T > T* maci::ContainerServices::getCollocatedComponent (maci::ComponentSpec compSpec, bool markAsDefault, const char * targetComponent) Gets a collocated component This method uses templates, so no cast to the request object is required

Parameters:

compSpec The description of the component to activate
markAsDefault
If true, the component becomes the default component for that IDL type
targetComponent
name of the target component (where to activate component)

Exceptions:

maciErrType::NoPermissionExImpl
maciErrType::IncompleteComponentSpecExImpl
maciErrType::InvalidComponentSpecExImpl
maciErrType::ComponentSpecIncompatibleWithActiveComponentExImpl
maciErrType::CannotGetComponentExImpl

Returns:

The reference to the component

template<typename T > SmartPtr<T> maci::ContainerServices::getCollocatedComponentSmartPtr (maci::ComponentSpec compSpec, bool markAsDefault, const char * targetComponent) Gets a smart ponter to a collocated component This method uses templates, so no cast to the request object is required

Parameters:

compSpec The description of the component to activate
markAsDefault
If true, the component becomes the default component for that IDL type
targetComponent
name of the target component (where to activate component)

Exceptions:

maciErrType::NoPermissionExImpl
maciErrType::IncompleteComponentSpecExImpl
maciErrType::InvalidComponentSpecExImpl
maciErrType::ComponentSpecIncompatibleWithActiveComponentExImpl
maciErrType::CannotGetComponentExImpl

Returns:

A smart pointer containing the reference to the component

template<class T > T* maci::ContainerServices::getComponent (const char * name) Gets the specified component This method uses templates, so no cast to the request object is required

Parameters:

The name of the deployed component instance

Exceptions:

maciErrType::CannotGetComponentExImpl

Returns:

Reference to the component

Reimplemented in maci::MockContainerServices.

virtual maci::ComponentInfo maci::ContainerServices::getComponentDescriptor (const char * componentName) [pure 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

Implemented in maci::MockContainerServices, TestContainerServices, maci::MACIContainerServices, and StaticContainerServices.

template<class T > T* maci::ContainerServices::getComponentNonSticky (const char * name) Gets the specified component as non sticky. for the details of getting a componet non sticky see get_component_non_sticky This method uses templates, so no cast to the request object is required

Parameters:

The name of the deployed component instance

Exceptions:

maciErrType::CannotGetComponentExImpl

Returns:

Reference to the component

template<typename T > SmartPtr<T> maci::ContainerServices::getComponentNonStickySmartPtr (const char * name) Gets a smart pointer to the specified component as non sticky. for the details of getting a componet non sticky see get_component_non_sticky This method uses templates, so no cast to the request object is required

Parameters:

The name of the deployed component instance

Exceptions:

maciErrType::CannotGetComponentExImpl

Returns:

A smart pointer containing the reference to the component

template<typename T > SmartPtr<T> maci::ContainerServices::getComponentSmartPtr (const char * name) Gets a smart pointer to the specified component This method uses templates, so no cast to the request object is required

Parameters:

The name of the deployed component instance

Exceptions:

maciErrType::CannotGetComponentExImpl

Returns:

A smart pointer containing the reference to the component

virtual ComponentStateManager* maci::ContainerServices::getComponentStateManager () [pure 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

Implemented in maci::MockContainerServices, TestContainerServices, maci::MACIContainerServices, and StaticContainerServices.

virtual CORBA::Object* maci::ContainerServices::getCORBACollocatedComponent (maci::ComponentSpec compSpec, bool markAsDefault, const char * targetComponent) [protected, pure virtual] Gets a collocated component as a Corba object.

Parameters:

compSpec The description of the component to activate
markAsDefault
If true, the component becomes the default component for that IDL type
targetComponent
name of the target component (where to activate component)

Exceptions:

maciErrType::NoPermissionExImpl
maciErrType::IncompleteComponentSpecExImpl
maciErrType::InvalidComponentSpecExImpl
maciErrType::ComponentSpecIncompatibleWithActiveComponentExImpl
maciErrType::CannotGetComponentExImpl

Returns:

The reference to the component

Implemented in maci::MockContainerServices, TestContainerServices, maci::MACIContainerServices, and StaticContainerServices.

virtual CORBA::Object* maci::ContainerServices::getCORBAComponent (const char * name) [protected, pure virtual] Gets the specified component as a Corba object.

Parameters:

The name of the deployed component instance

Exceptions:

maciErrType::CannotGetComponentExImpl

Returns:

Reference to the component

Implemented in maci::MockContainerServices, TestContainerServices, maci::MACIContainerServices, and StaticContainerServices.

virtual CORBA::Object* maci::ContainerServices::getCORBAComponentNonSticky (const char * name) [protected, pure virtual] Gets the specified component non sticky as a Corba object. for details about getting a component non sticky see get_component_non_sticky

Parameters:

The name of the deployed component instance

Exceptions:

maciErrType::CannotGetComponentExImpl

Returns:

Reference to the component

Implemented in maci::MockContainerServices, TestContainerServices, maci::MACIContainerServices, and StaticContainerServices.

virtual CORBA::Object* maci::ContainerServices::getCORBADefaultComponent (const char * idlType) [protected, pure virtual] Gets the default component specified by the IDL component type as a CORBA object.

Parameters:

idlType,: the idl type of the component to activate For example IDL:alma/PS/PowerSupply:1.0

Exceptions:

maciErrType::NoPermissionExImpl
maciErrType::NoDefaultComponentExImpl
maciErrType::CannotGetComponentExImpl

Returns:

The reference to the component

Implemented in maci::MockContainerServices, TestContainerServices, maci::MACIContainerServices, and StaticContainerServices.

virtual CORBA::Object* maci::ContainerServices::getCORBADynamicComponent (maci::ComponentSpec compSpec, bool markAsDefault) [protected, pure virtual] Gets a dynamic component as a Corba object.

Parameters:

compSpec The description of the component to activate
markAsDefault
If true, the component becomes the default component for that IDL type

Exceptions:

maciErrType::NoPermissionExImpl
maciErrType::IncompleteComponentSpecExImpl
maciErrType::InvalidComponentSpecExImpl
maciErrType::ComponentSpecIncompatibleWithActiveComponentExImpl
maciErrType::CannotGetComponentExImpl

Returns:

The reference to the component

Implemented in maci::MockContainerServices, TestContainerServices, maci::MACIContainerServices, and StaticContainerServices.

template<class T > T* maci::ContainerServices::getDefaultComponent (const char * idlType) Gets the default component specified by the IDL component type. This method uses templates, so no cast to the request object is required

Parameters:

idlType,: the idl type of the component to activate For example IDL:alma/PS/PowerSupply:1.0

Exceptions:

maciErrType::NoPermissionExImpl
maciErrType::NoDefaultComponentExImpl
maciErrType::CannotGetComponentExImpl

Returns:

The reference to the component

template<typename T > SmartPtr<T> maci::ContainerServices::getDefaultComponentSmartPtr (const char * idlType) Gets a smart pointer to the default component specified by the IDL component type. This method uses templates, so no cast to the request object is required

Parameters:

idlType,: the idl type of the component to activate For example IDL:alma/PS/PowerSupply:1.0

Exceptions:

maciErrType::NoPermissionExImpl
maciErrType::NoDefaultComponentExImpl
maciErrType::CannotGetComponentExImpl

Returns:

A smart pointer containing the reference to the component

template<class T > T* maci::ContainerServices::getDynamicComponent (maci::ComponentSpec compSpec, bool markAsDefault) Gets a dynamic component This method uses templates, so no cast to the request object is required

Parameters:

compSpec The description of the component to activate
markAsDefault
If true, the component becomes the default component for that IDL type

Exceptions:

maciErrType::NoPermissionExImpl
maciErrType::IncompleteComponentSpecExImpl
maciErrType::InvalidComponentSpecExImpl
maciErrType::ComponentSpecIncompatibleWithActiveComponentExImpl
maciErrType::CannotGetComponentExImpl

Returns:

The reference to the component

template<typename T > SmartPtr<T> maci::ContainerServices::getDynamicComponentSmartPtr (maci::ComponentSpec compSpec, bool markAsDefault) Gets a smart pointer to a dynamic component This method uses templates, so no cast to the request object is required

Parameters:

compSpec The description of the component to activate
markAsDefault
If true, the component becomes the default component for that IDL type

Exceptions:

maciErrType::NoPermissionExImpl
maciErrType::IncompleteComponentSpecExImpl
maciErrType::InvalidComponentSpecExImpl
maciErrType::ComponentSpecIncompatibleWithActiveComponentExImpl
maciErrType::CannotGetComponentExImpl

Returns:

A smart pointer containing the reference to the component

ACE_CString maci::ContainerServices::getName () [inline] Return the name of the component

Returns:

The ACE_CString string with the name of the component

References m_componentName.

virtual PortableServer::POA_var maci::ContainerServices::getOffShootPOA () [pure virtual] Get the OffShoot POA

Returns:

The offshoot POA

Implemented in maci::MockContainerServices, TestContainerServices, maci::MACIContainerServices, and StaticContainerServices.

PortableServer::POA_var maci::ContainerServices::getPOA () [inline] Get POA reference This function is used to return m_poa because inherited classes would not have access to it otherwise.

Returns:

POA reference

References m_poa.

virtual ACS::ThreadManager* maci::ContainerServices::getThreadManager () [inline, virtual] Returns a pointer to the ThreadManager which should be used for creating and destroying threads inside a component

Todo

This returns a pointer to the intermal threadManager object. This operation is potentially dangerous and we should may be better return a reference counting Loki smart pointer, but this requires changing the interfaces.

References threadManager_m.

ACE_CString maci::ContainerServices::getType () [inline] Return the component IDL type

Returns:

The ACE_CString string with the component IDL type

References m_componentType.

void maci::ContainerServices::registerComponentListener (ComponentListener * listener)

virtual void maci::ContainerServices::releaseAllComponents () [pure virtual] Release all the components

Returns:

void

Implemented in maci::MockContainerServices, TestContainerServices, maci::MACIContainerServices, and StaticContainerServices.

virtual void maci::ContainerServices::releaseComponent (const char * name) [pure virtual] Releases the specified component.

Parameters:

The name of the component instance to be released

Exceptions:

maciErrType::CannotReleaseComponentExImpl

Returns:

void

Implemented in maci::MockContainerServices, TestContainerServices, maci::MACIContainerServices, and StaticContainerServices.

Member Data Documentation

ComponentListener* maci::ContainerServices::compListener [protected]

ACE_CString maci::ContainerServices::m_componentName [protected]

Referenced by getName().

ACE_CString maci::ContainerServices::m_componentType [protected]

Referenced by getType(), and TestContainerServices::TestContainerServices().

PortableServer::POA_var maci::ContainerServices::m_poa [protected] POA reference This is a reference to the POA activating the component that owns this container services

Referenced by getPOA().

ACS::ThreadManager maci::ContainerServices::threadManager_m [protected] ThreadManager Thread Manager should be used for creating threads inside a component

Referenced by getThreadManager().

bool maci::ContainerServices::withCompListener [protected]

Author

Generated automatically by Doxygen for ACS-2015.2 C++ API from the source code.