Library: OSP
Package: Bundle
Header: Poco/OSP/BundleActivator.h
The BundleActivator is the entry point for every bundle contributing executable code and requiring special action upon startup or shutdown.
A bundle should provide its own BundleActivator class derived from this class.
The BundleActivator (or, correctly speaking, a class derived from it) is the only class loaded from the bundle by the OSP framework.
To prevent lengthy startup and shutdown sequences, the start() and stop() method should do their work in a timely fashion.
virtual ~BundleActivator();
Destroys the BundleActivator.
virtual void start(
BundleContext::Ptr pContext
) = 0;
Called during the "starting" phase of a bundle, after all dependencies have been resolved.
Typical things to do in this member function are
The BundleContext object passed as argument is valid through the entire lifetime of the bundle (until stop() returns) and can be stored for later reference.
virtual void stop(
BundleContext::Ptr pContext
) = 0;
Called during the "stopping" phase of the bundle.
Typical things to do in this member function are