X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=binding%2Fmdsal-binding-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fmdsal%2Fbinding%2Fapi%2FActionProviderService.java;h=7a1ee8cb117ab7276d9d8dfce26dee6e350c12b4;hb=5f8a373c07549a901b70595067dd11c161d0c4e4;hp=a818c833e74809dc65931a1b8113a71483ad2739;hpb=aa629fb8d217a4d42a92aa8e78d7ae679f797346;p=mdsal.git diff --git a/binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/ActionProviderService.java b/binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/ActionProviderService.java index a818c833e7..7a1ee8cb11 100644 --- a/binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/ActionProviderService.java +++ b/binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/ActionProviderService.java @@ -7,12 +7,11 @@ */ package org.opendaylight.mdsal.binding.api; -import com.google.common.annotations.Beta; import com.google.common.collect.ImmutableSet; import java.util.Set; import org.eclipse.jdt.annotation.NonNull; import org.opendaylight.mdsal.common.api.LogicalDatastoreType; -import org.opendaylight.yangtools.concepts.ObjectRegistration; +import org.opendaylight.yangtools.concepts.Registration; import org.opendaylight.yangtools.yang.binding.Action; import org.opendaylight.yangtools.yang.binding.DataObject; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; @@ -22,10 +21,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; * and implementations can be invoked dynamically at runtime, via {@link ActionService}. Implementations registered * with this interface may throw {@link IllegalArgumentException}s when they encounter inconsistent input data and * {@link IllegalStateException} in they are unable to service the request. - * - * @author Robert Varga */ -@Beta public interface ActionProviderService extends BindingService { /** * Register an implementation of an action, potentially constrained to a set of nodes. @@ -35,24 +31,24 @@ public interface ActionProviderService extends BindingService { * @param datastore {@link LogicalDatastoreType} on which the implementation operates * @param validNodes Set of nodes this implementation is constrained to, empty if this implementation can handle * any target node. - * @return An {@link ObjectRegistration} + * @return A {@link Registration} * @throws NullPointerException if any of the arguments is null * @throws IllegalArgumentException if any of the {@code validNodes} does not match {@code datastore} * @throws UnsupportedOperationException if this service cannot handle requested datastore */ -

, ?, ?>, S extends A> - @NonNull ObjectRegistration registerImplementation(@NonNull ActionSpec spec, @NonNull S implementation, +

, ?, ?>> + @NonNull Registration registerImplementation(@NonNull ActionSpec spec, @NonNull A implementation, @NonNull LogicalDatastoreType datastore, @NonNull Set> validNodes); - default

, ?, ?>, S extends T> - @NonNull ObjectRegistration registerImplementation(final @NonNull ActionSpec spec, - final @NonNull S implementation, final @NonNull LogicalDatastoreType datastore) { + default

, ?, ?>> + @NonNull Registration registerImplementation(final @NonNull ActionSpec spec, + final @NonNull A implementation, final @NonNull LogicalDatastoreType datastore) { return registerImplementation(spec, implementation, datastore, ImmutableSet.of()); } - default

, ?, ?>, S extends T> - @NonNull ObjectRegistration registerImplementation(final @NonNull ActionSpec spec, - final @NonNull S implementation) { + default

, ?, ?>> + @NonNull Registration registerImplementation(final @NonNull ActionSpec spec, + final @NonNull A implementation) { return registerImplementation(spec, implementation, LogicalDatastoreType.OPERATIONAL); } }