X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fapi%2FDOMRpcProviderService.java;h=21f0da24bfa4854938d885d8db70b4531ae1614b;hp=4a4f9656ba6db1fc444f3809d7b7a16844756a4f;hb=adf49155eced15c9f654d7bed7ee45cd95686e4f;hpb=3927509ec3ecfa32a51b725d2b7155d425f5b877 diff --git a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMRpcProviderService.java b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMRpcProviderService.java index 4a4f9656ba..21f0da24bf 100644 --- a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMRpcProviderService.java +++ b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/md/sal/dom/api/DOMRpcProviderService.java @@ -7,12 +7,28 @@ */ package org.opendaylight.controller.md.sal.dom.api; +import com.google.common.collect.ImmutableSet; import java.util.Set; import javax.annotation.Nonnull; /** - * A {@link DOMService} which allows registration of RPC implementations with a conceptual - * router. The client counterpart of this service is {@link DOMRpcService}. + * A {@link DOMService} which allows registration of RPC implementations with a conceptual router. The client + * counterpart of this service is {@link DOMRpcService}. + * + *

+ * This interface supports both RFC6020 RPCs and RFC7950 actions (formerly known as 'Routed RPCs'. Invocation for + * RFC6020 RPCs is always based on an empty context reference. Invocation of actions requires a non-empty context + * reference and is matched against registered implementations as follows: + *

+ * + *

+ * All implementations are required to perform these steps as specified above. */ public interface DOMRpcProviderService extends DOMService { /** @@ -25,7 +41,10 @@ public interface DOMRpcProviderService extends DOMService { * @throws NullPointerException if implementation or types is null * @throws IllegalArgumentException if types is empty or contains a null element. */ - @Nonnull DOMRpcImplementationRegistration registerRpcImplementation(@Nonnull T implementation, @Nonnull DOMRpcIdentifier... rpcs); + default @Nonnull DOMRpcImplementationRegistration registerRpcImplementation( + @Nonnull final T implementation, @Nonnull final DOMRpcIdentifier... rpcs) { + return registerRpcImplementation(implementation, ImmutableSet.copyOf(rpcs)); + } /** * Register an {@link DOMRpcImplementation} object with this service. @@ -36,5 +55,6 @@ public interface DOMRpcProviderService extends DOMService { * @throws NullPointerException if implementation or types is null * @throws IllegalArgumentException if types is empty or contains a null element. */ - @Nonnull DOMRpcImplementationRegistration registerRpcImplementation(@Nonnull T implementation, @Nonnull Set rpcs); + @Nonnull DOMRpcImplementationRegistration registerRpcImplementation( + @Nonnull T implementation, @Nonnull Set rpcs); }