激活所有捆绑包后,如何使捆绑包激活剂实例调用方法
启动每个捆绑包后,我需要调用带有捆绑激活程序实例的方法。我有五捆。如何获得捆绑激活程序实例? 要求:仅调用Activator实例的方法。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看使用EventHandler(或者可能取决于您的用例)。 OSGI定义了EventHandler将收到的FrameWorkevent。您可以根据“开始”事件配置第二阶段以触发。
替代:org.osgi.util.tracker.bundletracker
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