Activator.java 文件源码

java
阅读 39 收藏 0 点赞 0 评论 0

项目:osgi-in-action 作者:
private synchronized void bindRegistry(Registry registry,
    String[] intents, String[] configs) {
  RegistryWatcher watcher = new RegistryWatcher(ctx, registry);
  watchers.put(registry, watcher);

  ServiceRegistration[] regs = new ServiceRegistration[2];

  ExportedServiceTracker export = new ExportedServiceTracker(ctx,
      registry, intents, configs);
  export.open();

  trackers.put(registry, export);

  ImportedServiceFindHook find = new ImportedServiceFindHook(watcher);
  regs[0] = ctx.registerService(FindHook.class.getName(), find, null);

  ImportedServiceListenerHook listener = new ImportedServiceListenerHook(
      watcher);
  regs[1] = ctx.registerService(ListenerHook.class.getName(), listener,
      null);

  serviceRegs.put(registry, regs);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号