A Framework instance.
- The system bundle is always assigned a bundle identifier of zero (0).
- The system bundle
GetLocationmethod returns the string: “System Bundle”.
- The system bundle’s life cycle cannot be managed like normal bundles. Its life cycle methods behave as follows:
- Start - Initialize the framework and start installed bundles.
- Stop - Stops all installed bundles.
- Uninstall - The Framework throws a std::runtime_error exception indicating that the system bundle cannot be uninstalled.
- This class is thread-safe.
- FrameworkFactory::NewFramework(const std::map<std::string, Any>& configuration)
Inherits from cppmicroservices::Bundle
b: The system bundle
std::logic_error: If the bundle is not the system bundle.
Initialize this Framework.
After calling this method, this Framework has:
- Generated a new framework UUID.
- Moved to the STATE_STARTING state.
- A valid Bundle Context.
- Event handling enabled.
- Reified Bundle objects for all installed bundles.
- Registered any framework services.
std::runtime_error: If this Framework could not be initialized.
WaitForStop(const std::chrono::milliseconds &timeout)¶
Wait until this Framework has completely stopped.
This method can be used to wait until the asynchronous stop of this Framework has completed. This method will only wait if called when this Framework is in the STATE_STARTING, STATE_ACTIVE, or STATE_STOPPING states. Otherwise it will return immediately.
- A Framework Event indicating the reason this method returned. The following
FrameworkEventtypes may be returned by this method.
timeout: Maximum time duration to wait until this Framework has completely stopped. A value of zero will wait indefinitely.