- private static final Predicate<PotentialSchemaSource<?>> YANG_SCHEMA_SOURCE = new Predicate<PotentialSchemaSource<?>>() {
- @Override
- public boolean apply(final PotentialSchemaSource<?> input) {
- // filter out non yang sources
- return YangTextSchemaSource.class.isAssignableFrom(input.getRepresentation());
- }
- };
-
- protected DataBroker dataBroker;
- protected SchemaListenerRegistration schemaListenerRegistration;
- protected final SharedSchemaRepository schemaRepository;
- private final String bindingAddress;
- private final long bindingPort;
-
- public YangLibProvider(final SharedSchemaRepository schemaRepository,
- final String bindingAddress, final long bindingPort) {
- this.schemaRepository = schemaRepository;
- this.bindingAddress = bindingAddress;
- this.bindingPort = bindingPort;
+ private static final OptionalRevision NO_REVISION = new OptionalRevision("");
+ private static final Predicate<PotentialSchemaSource<?>> YANG_SCHEMA_SOURCE =
+ input -> YangTextSchemaSource.class.isAssignableFrom(input.getRepresentation());
+
+ private final DataBroker dataBroker;
+ private final YangLibServiceImpl yangLibService;
+ private final YanglibConfig yanglibConfig;
+ private SchemaListenerRegistration schemaListenerRegistration;
+ private SharedSchemaRepository schemaRepository;
+
+ public YangLibProvider(final YanglibConfig yanglibConfig, final DataBroker dataBroker,
+ final YangLibServiceImpl yangLibService) {
+ this.yanglibConfig = Preconditions.checkNotNull(yanglibConfig);
+ this.dataBroker = Preconditions.checkNotNull(dataBroker);
+ this.yangLibService = Preconditions.checkNotNull(yangLibService);