2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
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/eplv10.html
8 package org.opendaylight.yangtools.yang.model.repo.api;
10 import com.google.common.annotations.Beta;
11 import com.google.common.util.concurrent.CheckedFuture;
13 import java.util.Collection;
15 import javax.annotation.Nonnull;
17 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
20 * An asynchronous factory for building {@link SchemaContext} instances
21 * based on a specification of what {@link SourceIdentifier}s are required
22 * and dynamic recursive resolution.
25 public interface SchemaContextFactory {
27 * Create a new schema context containing specified sources, pulling in
28 * any dependencies they may have.
30 * @param requiredSources a collection of sources which are required to
32 * @return A checked future, which will produce a schema context, or
33 * fail with an explanation why the creation of the schema context
36 CheckedFuture<SchemaContext, SchemaResolutionException> createSchemaContext(@Nonnull Collection<SourceIdentifier> requiredSources);