#include <acsContainerServices.h>
List of all members.
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] |
Member Function Documentation
virtual ACS::OffShoot_ptr maci::ContainerServices::activateOffShoot |
( |
PortableServer::Servant |
cbServant |
) |
[pure virtual] |
virtual PortableServer::POA_var maci::ContainerServices::createOffShootPOA |
( |
|
) |
[pure virtual] |
virtual void maci::ContainerServices::deactivateOffShoot |
( |
PortableServer::Servant |
cbServant |
) |
[pure virtual] |
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::fireComponentsUnavailable |
( |
ACE_CString_Vector & |
compNames |
) |
|
virtual CDB::DAL_ptr maci::ContainerServices::getCDB |
( |
|
) |
[pure virtual] |
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] |
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 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] |
virtual CORBA::Object* maci::ContainerServices::getCORBAComponentNonSticky |
( |
const char * |
name |
) |
[protected, pure virtual] |
virtual CORBA::Object* maci::ContainerServices::getCORBADefaultComponent |
( |
const char * |
idlType |
) |
[protected, pure virtual] |
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] |
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] |
virtual void maci::ContainerServices::releaseComponent |
( |
const char * |
name |
) |
[pure virtual] |
Member Data Documentation
POA reference This is a reference to the POA activating the component that owns this container services
Referenced by getPOA().
ThreadManager Thread Manager should be used for creating threads inside a component
Referenced by getThreadManager().
The documentation for this class was generated from the following file: