Reputation: 1
I need to call a method with bundle activator instance after every bundle is started. I have five bundles. How do I get the bundle activator instance? Requirement: Call a method only with the activator instance.
Upvotes: 0
Views: 153
Reputation: 4316
Look into using EventHandler (or perhaps BundleTracker depending on your use case). OSGi defines a FrameworkEvent that an EventHandler will receive. You could configure your second stage to trigger based on the 'STARTED' event.
alternatively: org.osgi.util.tracker.BundleTracker
Upvotes: 0