如何控制服务可见性
有没有办法根据监听器的过滤器来控制服务的可见性?
我很失望地发现 EventHook 服务只能控制哪些bundle接收 ServiceEvent。不应该是哪些侦听器接收事件吗?它应该是类似于 ListenerHook.ListenerInfo 的集合,而不是上下文的集合。
是否有其他方法可以控制哪些侦听器接收事件?我想强制执行强制过滤属性来接收服务,可以吗?
Is there a way to control the visibility on services based on the filter of the listener?
I was disappointed to realize that the EventHook service can only control which bundles receive a ServiceEvent. Shouldn't it be which listeners receive the event? Instead of a collection of contexts it should be a collection of something similar to ListenerHook.ListenerInfo.
Is there another way I can control which listeners receive the events? I want to enforce a compulsory filter property to receive services, is it possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
引用 BJ Hargrave 在 osgi-dev 邮件列表上对同一问题的回答。
Quote of BJ Hargrave from an answer to the same question on osgi-dev maillist.
我想你正在寻找
I think you are looking