Apache Celix  2.4.0
Apache Celix is a framework for C, C++14 and C++17 to develop dynamic modular software applications using component and in-process service-oriented programming.
Public Member Functions | Friends | List of all members
celix::BundleTrackerBuilder Class Reference

Fluent builder API to track bundles. More...

#include <TrackerBuilders.h>

Public Member Functions

 BundleTrackerBuilder (std::shared_ptr< celix_bundle_context_t > _cCtx)
 
BundleTrackerBuilderoperator= (BundleTrackerBuilder &&)=delete
 
 BundleTrackerBuilder (const BundleTrackerBuilder &)=delete
 
BundleTrackerBuilder operator= (const BundleTrackerBuilder &)=delete
 
BundleTrackerBuilderincludeFrameworkBundleInCallback ()
 
BundleTrackerBuilderaddOnInstallCallback (std::function< void(const celix::Bundle &)> callback)
 Adds a "on install" callback function, which will be called - on the Celix event thread - when a new bundle has been installed. More...
 
BundleTrackerBuilderaddOnStartCallback (std::function< void(const celix::Bundle &)> callback)
 Adds a "on start" callback function, which will be called - on the Celix event thread - when a new bundle has been started. More...
 
BundleTrackerBuilderaddOnStopCallback (std::function< void(const celix::Bundle &)> callback)
 Adds a "on stop" callback function, which will be called - on the Celix event thread - when a new bundle has been stopped. More...
 
std::shared_ptr< BundleTrackerbuild ()
 "Builds" the bundle tracker and returns a BundleTracker. More...
 

Friends

class BundleContext
 

Detailed Description

Fluent builder API to track bundles.

See also
celix::BundleContext::trackBundles for more info.
Note
Not thread safe.

Constructor & Destructor Documentation

◆ BundleTrackerBuilder() [1/2]

celix::BundleTrackerBuilder::BundleTrackerBuilder ( std::shared_ptr< celix_bundle_context_t >  _cCtx)
inlineexplicit

◆ BundleTrackerBuilder() [2/2]

celix::BundleTrackerBuilder::BundleTrackerBuilder ( const BundleTrackerBuilder )
delete

Member Function Documentation

◆ addOnInstallCallback()

BundleTrackerBuilder& celix::BundleTrackerBuilder::addOnInstallCallback ( std::function< void(const celix::Bundle &)>  callback)
inline

Adds a "on install" callback function, which will be called - on the Celix event thread - when a new bundle has been installed.

The "on install" callback function has 1 arguments: A const reference to the installed bundle.

◆ addOnStartCallback()

BundleTrackerBuilder& celix::BundleTrackerBuilder::addOnStartCallback ( std::function< void(const celix::Bundle &)>  callback)
inline

Adds a "on start" callback function, which will be called - on the Celix event thread - when a new bundle has been started.

The "on start" callback function has 1 arguments: A const reference to the started bundle.

◆ addOnStopCallback()

BundleTrackerBuilder& celix::BundleTrackerBuilder::addOnStopCallback ( std::function< void(const celix::Bundle &)>  callback)
inline

Adds a "on stop" callback function, which will be called - on the Celix event thread - when a new bundle has been stopped.

The "on stop" callback function has 1 arguments: A const reference to the stopped bundle.

◆ build()

std::shared_ptr<BundleTracker> celix::BundleTrackerBuilder::build ( )
inline

"Builds" the bundle tracker and returns a BundleTracker.

The BundleTracker will be started async.

◆ includeFrameworkBundleInCallback()

BundleTrackerBuilder& celix::BundleTrackerBuilder::includeFrameworkBundleInCallback ( )
inline

◆ operator=() [1/2]

BundleTrackerBuilder& celix::BundleTrackerBuilder::operator= ( BundleTrackerBuilder &&  )
delete

◆ operator=() [2/2]

BundleTrackerBuilder celix::BundleTrackerBuilder::operator= ( const BundleTrackerBuilder )
delete

Friends And Related Function Documentation

◆ BundleContext

friend class BundleContext
friend

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