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=3f4e737fd133cbe636270eabe0f8cddb59668564;hpb=0f351bbc28ddf2cddfe30c8d018646d81953fa17;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 3f4e737fd1..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.NonNullByDefault; +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,37 +21,34 @@ 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 -@NonNullByDefault public interface ActionProviderService extends BindingService { /** * Register an implementation of an action, potentially constrained to a set of nodes. * - * @param actionInterface Generated Action interface + * @param spec Action instance specification * @param implementation Implementation of {@code actionInterface} * @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 */ - , T extends Action, S extends T> - ObjectRegistration registerImplementation(Class actionInterface, S implementation, - LogicalDatastoreType datastore, Set> validNodes); +

, ?, ?>> + @NonNull Registration registerImplementation(@NonNull ActionSpec spec, @NonNull A implementation, + @NonNull LogicalDatastoreType datastore, @NonNull Set> validNodes); - default , T extends Action, S extends T> - ObjectRegistration registerImplementation(final Class actionInterface, final S implementation, - final LogicalDatastoreType datastore) { - return registerImplementation(actionInterface, implementation, datastore, ImmutableSet.of()); + default

, ?, ?>> + @NonNull Registration registerImplementation(final @NonNull ActionSpec spec, + final @NonNull A implementation, final @NonNull LogicalDatastoreType datastore) { + return registerImplementation(spec, implementation, datastore, ImmutableSet.of()); } - default , T extends Action, S extends T> - ObjectRegistration registerImplementation(final Class actionInterface, final S implementation) { - return registerImplementation(actionInterface, implementation, LogicalDatastoreType.OPERATIONAL); + default

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