BundleFindHook

struct cppmicroservices::BundleFindHook

Bundle Context Hook Service.

Bundles registering this service will be called during bundle find (get bundles) operations.

Remark
Implementations of this interface are required to be thread-safe.

Public Functions

virtual ~BundleFindHook()
virtual void Find(BundleContext const &context, ShrinkableVector<Bundle> &bundles) = 0

Find hook method.

This method is called for bundle find operations using BundleContext::GetBundle(long) and BundleContext::GetBundles() methods. The find method can filter the result of the find operation.

Note
A find operation using the BundleContext::GetBundle(const std::string&) method does not cause the find method to be called, neither does any call to the static methods of the BundleRegistry class.
Parameters
  • context: The bundle context of the bundle performing the find operation.
  • bundles: A list of Bundles to be returned as a result of the find operation. The implementation of this method may remove bundles from the list to prevent the bundles from being returned to the bundle performing the find operation.