
Public Member Functions | |
| void | initialize (ContainerServices containerServices) throws ComponentLifecycleException |
| void | execute () throws ComponentLifecycleException |
| void | cleanUp () |
| void | aboutToAbort () |
Interface that every component has to implement.
The methods are used by the container to start and stop the component, that is, to manage its lifecycle.
Note that the constructor of the component implementation should be very small, preferably empty. Use the methods initialize(ContainerServices) and execute() instead.
TODOs:
| void alma::acs::component::ComponentLifecycle::aboutToAbort | ( | ) |
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.
Implemented in alma::contLogTest::TestLogLevelsCompImpl::TestLogLevelsCompImpl, alma::COUNTER::CounterConsumerImpl::CounterConsumerImpl, alma::COUNTER::CounterSupplierImpl::CounterSupplierImpl, alma::test::corbareftest::component::HelloWorldImpl, alma::lifecycleTest::TestLifeCycleCompImpl::TestLifeCycleCompImpl, alma::acs::component::ComponentImplBase, and alma::demo::HelloDemoImpl::HelloDemoImpl.
Referenced by alma::acs::container::ComponentAdapter::getComponentAbortionist().
| void alma::acs::component::ComponentLifecycle::cleanUp | ( | ) |
Called after the last functional call to the component has finished. The component should then orderly release resources etc.
Implemented in alma::contLogTest::TestLogLevelsCompImpl::TestLogLevelsCompImpl, alma::COUNTER::CounterConsumerImpl::CounterConsumerImpl, alma::COUNTER::CounterSupplierImpl::CounterSupplierImpl, alma::test::corbareftest::component::HelloWorldImpl, alma::lifecycleTest::TestLifeCycleCompImpl::TestLifeCycleCompImpl, alma::ACS::impl::CharacteristicComponentImpl, alma::acs::component::ComponentImplBase, alma::jconttest::DummyComponentImpl::DummyComponentImpl, alma::demo::EventConsumerImpl::EventConsumerImpl, alma::demo::EventSupplierImpl::EventSupplierImpl, alma::demo::HelloDemoImpl::HelloDemoImpl, alma::demo::LampAccessImpl::LampAccessImpl, alma::demo::LampCallbackImpl::LampCallbackImpl, alma::demo::test::AbstractNC::NCPublisherImpl, alma::demo::test::AbstractNC::NCReceiverImpl, alma::demo::test::EventConsumerImpl::EventConsumerImpl, alma::demo::test::EventILConsumerImpl::EventConsumerImpl, alma::demo::test::EventILSupplierImpl::EventSupplierImpl, alma::demo::test::EventSupplierCDBChannel::EventSupplierCDBChannel, alma::demo::test::EventSupplierImpl::EventSupplierImpl, alma::ACS::MasterComponentImpl::MasterComponentImplBase, and alma::nctest::EventSupplierSpr2005067Impl::EventSupplierSpr2005067Impl.
Referenced by alma::acs::container::ComponentAdapter::deactivateComponent().
| void alma::acs::component::ComponentLifecycle::execute | ( | ) | throws ComponentLifecycleException |
Called after ComponentLifecycle#initialize(ContainerServices) to tell the component that it has to be ready to accept incoming functional calls any time.
Examples:
initialize seemed too early Must be implemented as a synchronous (blocking) call (can spawn threads though).
Implemented in alma::contLogTest::TestLogLevelsCompImpl::TestLogLevelsCompImpl, alma::COUNTER::CounterConsumerImpl::CounterConsumerImpl, alma::COUNTER::CounterSupplierImpl::CounterSupplierImpl, alma::test::corbareftest::component::HelloWorldImpl, alma::lifecycleTest::TestLifeCycleCompImpl::TestLifeCycleCompImpl, alma::acs::component::ComponentImplBase, alma::demo::HelloDemoImpl::HelloDemoImpl, and alma::demo::test::AbstractNC::NCReceiverImpl.
Referenced by alma::acs::container::ComponentAdapter::executeComponent().
| void alma::acs::component::ComponentLifecycle::initialize | ( | ContainerServices | containerServices | ) | throws ComponentLifecycleException |
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.
| containerServices | callback object for services provided by the container |
Implemented in alma::ACSCOURSE_MOUNT::Mount6Impl::Mount6Impl, alma::contLogTest::TestLogLevelsCompImpl::TestLogLevelsCompImpl, alma::COUNTER::CounterConsumerImpl::CounterConsumerImpl, alma::COUNTER::CounterSupplierImpl::CounterSupplierImpl, alma::test::corbareftest::component::HelloWorldImpl, alma::lifecycleTest::TestLifeCycleCompImpl::TestLifeCycleCompImpl, alma::ACS::impl::CharacteristicComponentImpl, alma::ACS::jbaci::enumProp::test::EnumTestComponentImpl, alma::acsexmplBuilding::BuildingImpl, alma::PS::PowerSupplyImpl, alma::TT::PrimComponentImpl, alma::TT::SeqComponentImpl, test::jbaci::SimpleMasterComponentImpl, alma::acs::component::ComponentImplBase, alma::demo::EventConsumerImpl::EventConsumerImpl, alma::demo::EventSupplierImpl::EventSupplierImpl, alma::demo::HelloDemoImpl::HelloDemoImpl, alma::demo::LampAccessImpl::LampAccessImpl, alma::demo::XmlComponentImpl::XmlComponentImpl, alma::demo::test::AbstractNC::NCPublisherImpl, alma::demo::test::AbstractNC::NCReceiverImpl, alma::demo::test::EventConsumerImpl::EventConsumerImpl, alma::demo::test::EventILConsumerImpl::EventConsumerImpl, alma::demo::test::EventILSupplierImpl::EventSupplierImpl, alma::demo::test::EventSupplierCDBChannel::EventSupplierCDBChannel, alma::demo::test::EventSupplierImpl::EventSupplierImpl, alma::ACS::MasterComponentImpl::MasterComponentImplBase, alma::ACS::SpecialTestMasterComponentImpl::SpecialTestMasterComponentImpl, and alma::nctest::EventSupplierSpr2005067Impl::EventSupplierSpr2005067Impl.
Referenced by alma::acs::container::ComponentAdapter::initializeComponent().
1.6.2