These interfaces are now properly generic, bind them to their
corresponding component.
Change-Id: Ib03ec6cfeee4c10fbbfc5e6e0950d1dd035cecfe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
@Reference
YangParserFactory parserFactory = null;
@Reference(target = "(component.factory=" + OSGiModuleInfoSnapshotImpl.FACTORY_NAME + ")")
@Reference
YangParserFactory parserFactory = null;
@Reference(target = "(component.factory=" + OSGiModuleInfoSnapshotImpl.FACTORY_NAME + ")")
- ComponentFactory contextFactory = null;
+ ComponentFactory<OSGiModuleInfoSnapshotImpl> contextFactory = null;
private YangModuleInfoScanner bundleTracker = null;
private YangModuleInfoRegistry moduleRegistry = null;
private YangModuleInfoScanner bundleTracker = null;
private YangModuleInfoRegistry moduleRegistry = null;
final class RegularYangModuleInfoRegistry extends YangModuleInfoRegistry {
private static final Logger LOG = LoggerFactory.getLogger(RegularYangModuleInfoRegistry.class);
final class RegularYangModuleInfoRegistry extends YangModuleInfoRegistry {
private static final Logger LOG = LoggerFactory.getLogger(RegularYangModuleInfoRegistry.class);
- private final ComponentFactory contextFactory;
+ private final ComponentFactory<OSGiModuleInfoSnapshotImpl> contextFactory;
private final ModuleInfoSnapshotResolver moduleInfoRegistry;
@GuardedBy("this")
private final ModuleInfoSnapshotResolver moduleInfoRegistry;
@GuardedBy("this")
- private ComponentInstance currentInstance;
+ private ComponentInstance<OSGiModuleInfoSnapshotImpl> currentInstance;
@GuardedBy("this")
private ModuleInfoSnapshot currentSnapshot;
@GuardedBy("this")
@GuardedBy("this")
private ModuleInfoSnapshot currentSnapshot;
@GuardedBy("this")
private volatile boolean ignoreScanner = true;
private volatile boolean ignoreScanner = true;
- RegularYangModuleInfoRegistry(final ComponentFactory contextFactory, final YangParserFactory factory) {
+ RegularYangModuleInfoRegistry(final ComponentFactory<OSGiModuleInfoSnapshotImpl> contextFactory,
+ final YangParserFactory factory) {
this.contextFactory = requireNonNull(contextFactory);
moduleInfoRegistry = new ModuleInfoSnapshotResolver("binding-dom-codec", factory);
}
this.contextFactory = requireNonNull(contextFactory);
moduleInfoRegistry = new ModuleInfoSnapshotResolver("binding-dom-codec", factory);
}
- final ComponentInstance newInstance = contextFactory.newInstance(
+ final ComponentInstance<OSGiModuleInfoSnapshotImpl> newInstance = contextFactory.newInstance(
OSGiModuleInfoSnapshotImpl.props(nextGeneration(), newSnapshot));
if (currentInstance != null) {
currentInstance.dispose();
OSGiModuleInfoSnapshotImpl.props(nextGeneration(), newSnapshot));
if (currentInstance != null) {
currentInstance.dispose();
* Update SchemaContext service in Service Registry each time new YangModuleInfo is added or removed.
*/
abstract class YangModuleInfoRegistry {
* Update SchemaContext service in Service Registry each time new YangModuleInfo is added or removed.
*/
abstract class YangModuleInfoRegistry {
- static @NonNull YangModuleInfoRegistry create(final BundleContext ctx, final ComponentFactory contextFactory,
- final YangParserFactory factory) {
+ static @NonNull YangModuleInfoRegistry create(final BundleContext ctx,
+ final ComponentFactory<OSGiModuleInfoSnapshotImpl> contextFactory, final YangParserFactory factory) {
return KarafFeaturesSupport.wrap(ctx, new RegularYangModuleInfoRegistry(contextFactory, factory));
}
return KarafFeaturesSupport.wrap(ctx, new RegularYangModuleInfoRegistry(contextFactory, factory));
}