Fixup yang-model-api javadoc warnings
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / repo / spi / SchemaSourceRegistry.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 package org.opendaylight.yangtools.yang.model.repo.spi;
9
10 import com.google.common.annotations.Beta;
11 import org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation;
12 import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
13
14 /**
15  * Registry of all potentially available schema sources. Processes capable of dynamic schema discovery, such as OSGi
16  * registry scanners, NETCONF clients (with NETCONF monitoring extension) and similar can register
17  * {@link SchemaSourceProvider} instances which would then acquire the schema source.
18  */
19 @Beta
20 public interface SchemaSourceRegistry {
21     /**
22      * Register a new schema source which is potentially available from a provider. A registration does not guarantee
23      * that a subsequent call to {@link SchemaSourceProvider#getSource(SourceIdentifier)} will succeed.
24      *
25      * @param <T> schema source representation type
26      * @param provider Resolver which can potentially resolve the identifier
27      * @param source Schema source details
28      * @return A registration handle. Invoking {@link SchemaSourceRegistration#close()} will cancel the registration.
29      */
30     <T extends SchemaSourceRepresentation> SchemaSourceRegistration<T> registerSchemaSource(
31             SchemaSourceProvider<? super T> provider, PotentialSchemaSource<T> source);
32
33     /**
34      * Register a schema source listener. The listener will be notified as new sources and their representations become
35      * available, subject to the provided filter.
36      *
37      * @param listener Schema source listener
38      * @return A registration handle. Invoking {@link SchemaListenerRegistration#close()} will cancel the registration.
39      */
40     SchemaListenerRegistration registerSchemaSourceListener(SchemaSourceListener listener);
41 }