Public Member Functions | Private Attributes

acscomponent::ACSComponentImpl Class Reference

#include <acscomponentImpl.h>

Inheritance diagram for acscomponent::ACSComponentImpl:
Inheritance graph
[legend]
Collaboration diagram for acscomponent::ACSComponentImpl:
Collaboration graph
[legend]

List of all members.

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::ContainerServicesgetContainerServices ()

Private Attributes

ACE_CString m_name
Loki::SmartPtr
< maci::ContainerServices
m_containerServices_p

Detailed Description

This class implements the ACS dynamic component, without any entry in the CDB, and provides life cycle methods. Characteristic components derive from this class.


Constructor & Destructor Documentation

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).

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


Member Function Documentation

virtual void acscomponent::ACSComponentImpl::__aboutToAbort (  )  [virtual]

The function stops the threads before calling aboutToAbort()

Returns:
void
virtual void acscomponent::ACSComponentImpl::__cleanUp (  )  [virtual]

The function stops the threads before calling cleanUp()

Returns:
void
virtual void acscomponent::ACSComponentImpl::__execute (  )  [virtual]

The function starts the thread before calling execute

Returns:
void
virtual void acscomponent::ACSComponentImpl::__initialize (  )  [virtual]

The __initialize simply calls initialize (added for uniformity with the other life cycle function)

Returns:
void
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.

Returns:
void

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.

Returns:
void

Reimplemented in DDSNCBenchmarkSupplierImpl, MaciContainerServicesTestClassImpl, DynamicTestClassImpl, and TMCDB::MonitorCollectorImpl.

virtual ::ACS::ComponentStates acscomponent::ACSComponentImpl::componentState (  ) 

Property for the state of the ACSComponent

Returns:
state of the ACSComponent


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).

Returns:
void

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

Returns:
A pointer to the container services

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.

Returns:
POA reference

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.

Returns:
void

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.

Returns:
Name of DO


Member Data Documentation

Smart pointer of the container services

Referenced by getPOA().

Name of the component

Reimplemented in MaciTestClass.


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