#include <acscomponentImpl.h>
Public Member Functions | |
ACSComponentImpl (const ACE_CString &name, maci::ContainerServices *containerServices) | |
virtual | ~ACSComponentImpl () |
PortableServer::POA_var | getPOA () |
virtual char * | name () |
virtual ::ACS::ComponentStates | componentState () |
virtual void | initialize () |
virtual void | execute () |
virtual void | cleanUp () |
virtual void | aboutToAbort () |
virtual void | __execute () |
virtual void | __aboutToAbort () |
virtual void | __cleanUp () |
virtual void | __initialize () |
maci::ContainerServices * | getContainerServices () |
Private Attributes | |
ACE_CString | m_name |
Loki::SmartPtr < maci::ContainerServices > | m_containerServices_p |
This class implements the ACS dynamic component, without any entry in the CDB, and provides life cycle methods. Characteristic components derive from this class.
acscomponent::ACSComponentImpl::ACSComponentImpl | ( | const ACE_CString & | name, | |
maci::ContainerServices * | containerServices | |||
) |
Constructor. The ACSComponent shall be considered an abstract class and at the end of the constructor the state of the ACSComponent is set to COMPSTATE_NEW (m_componentState = ACS::COMPSTATE_NEW).
poa | poa which will activate this and also all other Components | |
name | ACSComponent name | |
containerServices | pointer to services provided by the container |
virtual acscomponent::ACSComponentImpl::~ACSComponentImpl | ( | ) | [virtual] |
Destructor
Note: ContainerServices is not availble in the destructor
virtual void acscomponent::ACSComponentImpl::__aboutToAbort | ( | ) | [virtual] |
The function stops the threads before calling aboutToAbort()
virtual void acscomponent::ACSComponentImpl::__cleanUp | ( | ) | [virtual] |
The function stops the threads before calling cleanUp()
virtual void acscomponent::ACSComponentImpl::__execute | ( | ) | [virtual] |
The function starts the thread before calling execute
virtual void acscomponent::ACSComponentImpl::__initialize | ( | ) | [virtual] |
The __initialize simply calls initialize (added for uniformity with the other life cycle function)
virtual void acscomponent::ACSComponentImpl::aboutToAbort | ( | ) | [virtual] |
Called when due to some error condition the component is about to be forcefully removed some unknown amount of time later (usually not very much...). The component should make an effort to die as neatly as possible. Because of its urgency, this method will be called asynchronously to the execution of any other method of the component.
Reimplemented in MaciContainerServicesTestClassImpl, and DynamicTestClassImpl.
virtual void acscomponent::ACSComponentImpl::cleanUp | ( | ) | [virtual] |
Called after the last functional call to the component has finished. The component should then orderly release resources etc. If this method is overwritten in a subclass, the developer has to make sure that all cleanup performed by the implementation of the base class take place. The best way to do this is to call the implementation of the base itself explicitly, as would be done implicitly in a destructor chain.
Reimplemented in DDSNCBenchmarkSupplierImpl, MaciContainerServicesTestClassImpl, DynamicTestClassImpl, and TMCDB::MonitorCollectorImpl.
virtual ::ACS::ComponentStates acscomponent::ACSComponentImpl::componentState | ( | ) |
virtual void acscomponent::ACSComponentImpl::execute | ( | ) | [virtual] |
Called after initialize to tell the component that it has to be ready to accept incoming functional calls any time. Must be implemented as a synchronous (blocking) call (can spawn threads though).
Reimplemented in MaciContainerServicesTestClassImpl, DynamicTestClassImpl, and MaciHierarchicalTestClass.
maci::ContainerServices* acscomponent::ACSComponentImpl::getContainerServices | ( | ) |
Get a pointer to the services provided by the container which hosts the component
PortableServer::POA_var acscomponent::ACSComponentImpl::getPOA | ( | ) | [inline] |
Get POA reference This function is used to return m_poa because inherited classes would not have access to it otherwise.
References m_containerServices_p.
virtual void acscomponent::ACSComponentImpl::initialize | ( | ) | [virtual] |
Called to give the component time to initialize itself. For instance, the component could retrieve connections, read in configuration files/parameters, build up in-memory tables, ... Called before execute. In fact, this method might be called quite some time before functional requests can be sent to the component. Must be implemented as a synchronous (blocking) call.
Reimplemented in InitErrorHelloWorld, TimingExplorerImpl, MaciContainerServicesTestClassImpl, DynamicTestClassImpl, and TMCDB::MonitorCollectorImpl.
virtual char* acscomponent::ACSComponentImpl::name | ( | ) | [virtual] |
Property for the name of the ACSComponent The string returned by this method is the actual name of this instance which the manager can convert to a DO reference if a client has the right access level.
Loki::SmartPtr<maci::ContainerServices> acscomponent::ACSComponentImpl::m_containerServices_p [private] |
Smart pointer of the container services
Referenced by getPOA().
ACE_CString acscomponent::ACSComponentImpl::m_name [private] |
Name of the component
Reimplemented in MaciTestClass.