iPOJO:@Publishes 和 @Subscriber 的标识符唯一性命名空间
我正在使用 iPOJO
构建一些组件很棒的 EventAdmin 处理程序。该文档需要发布者和订阅者的名称属性,充当“唯一标识符”。
强制执行唯一性的范围是什么?
如果它就在我的捆绑包中,我可能会选择一些简短而有趣的内容,例如“mySpecialPublisher
”。如果它跨越由iPOJO
增强的所有捆绑包,我可能会选择更正式的东西,例如“com.mycompany.my.special.publisher
”。
i'm building some components using iPOJO
's awesome EventAdmin handlers. the documentation requires a name attribute for publishers and subscribers, acting as a "unique identifier".
what is the scope in which the uniqueness is enforced?
if it's just within my bundle, i might choose something short and sweet, like "mySpecialPublisher
". if it's across all bundles enhanced by iPOJO
, i might choose something more formal, like "com.mycompany.my.special.publisher
".
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它应该是全球唯一的,原因有二:
* 它用作service.pid(应该是唯一的)
* 它用于计算实例连接(架构)
It should be globally unique for two reasons:
* it is used as service.pid (which should be unique)
* it's used to compute instance connections (architecture)