Class AbstractSchemaRepository
java.lang.Object
org.opendaylight.yangtools.yang.model.repo.spi.AbstractSchemaRepository
- All Implemented Interfaces:
org.opendaylight.yangtools.yang.model.repo.api.SchemaRepository,SchemaSourceRegistry
@Beta
public abstract class AbstractSchemaRepository
extends Object
implements org.opendaylight.yangtools.yang.model.repo.api.SchemaRepository, SchemaSourceRegistry
Abstract base class for
SchemaRepository implementations. It handles registration and lookup of schema
sources, subclasses need only to provide their own SchemaRepository.createEffectiveModelContextFactory() implementation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation>
com.google.common.util.concurrent.ListenableFuture<T>getSchemaSource(org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier id, Class<T> representation) <T extends org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation>
SchemaSourceRegistration<T>registerSchemaSource(SchemaSourceProvider<? super T> provider, PotentialSchemaSource<T> source) Register a new schema source which is potentially available from a provider.Register a schema source listener.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opendaylight.yangtools.yang.model.repo.api.SchemaRepository
createEffectiveModelContextFactory, createEffectiveModelContextFactory
-
Constructor Details
-
AbstractSchemaRepository
public AbstractSchemaRepository()
-
-
Method Details
-
getSchemaSource
public <T extends org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation> com.google.common.util.concurrent.ListenableFuture<T> getSchemaSource(org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier id, Class<T> representation) - Specified by:
getSchemaSourcein interfaceorg.opendaylight.yangtools.yang.model.repo.api.SchemaRepository
-
registerSchemaSource
public <T extends org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation> SchemaSourceRegistration<T> registerSchemaSource(SchemaSourceProvider<? super T> provider, PotentialSchemaSource<T> source) Description copied from interface:SchemaSourceRegistryRegister a new schema source which is potentially available from a provider. A registration does not guarantee that a subsequent call toSchemaSourceProvider.getSource(SourceIdentifier)will succeed.- Specified by:
registerSchemaSourcein interfaceSchemaSourceRegistry- Type Parameters:
T- schema source representation type- Parameters:
provider- Resolver which can potentially resolve the identifiersource- Schema source details- Returns:
- A registration handle. Invoking
SchemaSourceRegistration.close()will cancel the registration.
-
registerSchemaSourceListener
Description copied from interface:SchemaSourceRegistryRegister a schema source listener. The listener will be notified as new sources and their representations become available, subject to the provided filter.- Specified by:
registerSchemaSourceListenerin interfaceSchemaSourceRegistry- Parameters:
listener- Schema source listener- Returns:
- A registration handle. Invoking
ListenerRegistration.close()will cancel the registration.
-