BUG-9043: Remove use of CheckedFuture from YANG components
[yangtools.git] / yang / yang-model-api / src / main / java / org / opendaylight / yangtools / yang / model / repo / spi / SchemaSourceProvider.java
index cdf6701805d94c700d856a49a0c32ea1ad3a3217..06c0a2a5cc9725ab06c369b93ef7fcaedfbe9b7f 100644 (file)
@@ -8,9 +8,8 @@
 package org.opendaylight.yangtools.yang.model.repo.spi;
 
 import com.google.common.annotations.Beta;
-import com.google.common.util.concurrent.CheckedFuture;
+import com.google.common.util.concurrent.ListenableFuture;
 import org.opendaylight.yangtools.yang.model.repo.api.MissingSchemaSourceException;
-import org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceException;
 import org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation;
 import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
 
@@ -34,16 +33,17 @@ public interface SchemaSourceProvider<T extends SchemaSourceRepresentation> {
      * the newest available revision, or throws {@link MissingSchemaSourceException}.
      * </ul>
      *
+     * <p>
      * In either case the returned representation is required to report a non-null
      * revision in the {@link SourceIdentifier} returned from
      * {@link SchemaSourceRepresentation#getIdentifier()}.
      *
+     * <p>
      * Implementations are not required to provide constant behavior in time, notably
      * this different invocation of this method may produce different results.
      *
      * @param sourceIdentifier source identifier
-     * @return source representation if supplied YANG module is available
-     *
+     * @return future source representation, if supplied YANG module is available
      */
-    CheckedFuture<? extends T, SchemaSourceException> getSource(SourceIdentifier sourceIdentifier);
+    ListenableFuture<? extends T> getSource(SourceIdentifier sourceIdentifier);
 }