Add RpcProviderService documentation 01/103301/1
authorRobert Varga <robert.varga@pantheon.tech>
Sun, 20 Nov 2022 18:42:38 +0000 (19:42 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Sun, 20 Nov 2022 18:47:32 +0000 (19:47 +0100)
We have largely-undocumented methods. Add documentation.

Change-Id: I7b12ba2d412d6de276e4c62277ff3c852e72a996
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/mdsal-binding-api/src/main/java/org/opendaylight/mdsal/binding/api/RpcProviderService.java
binding/mdsal-binding-dom-adapter/src/main/java/org/opendaylight/mdsal/binding/dom/adapter/BindingDOMRpcProviderServiceAdapter.java
binding/mdsal-binding-dom-adapter/src/main/java/org/opendaylight/mdsal/binding/dom/adapter/osgi/OSGiRpcProviderService.java

index 9fb9a39b26cec3516822d604297604929a116f50..4979d621eb065f50f4e3024a0d096bdb31d74169 100644 (file)
@@ -13,17 +13,34 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.RpcService;
 
 /**
- * Provides ability to registered Remote Procedure Call (RPC) service implementations. The RPCs are
- * defined in YANG models.
- *
+ * Provides ability to registered Remote Procedure Call (RPC) service implementations. The RPCs are defined in YANG
+ * models.
  */
 public interface RpcProviderService extends BindingService {
+    /**
+     * Register RPCs combined in a {@link RpcService} interface.
+     *
+     * @param <R> {@link RpcService} type
+     * @param <I> {@link RpcService} implementation type
+     * @param type {@link RpcService} class
+     * @param implementation implementation object
+     * @return An {@link ObjectRegistration} controlling unregistration
+     * @throws NullPointerException if any argument is {@code null}
+     */
+    <R extends RpcService, I extends R> ObjectRegistration<I> registerRpcImplementation(Class<R> type,
+        I implementation);
 
-    <S extends RpcService, T extends S> ObjectRegistration<T> registerRpcImplementation(Class<S> type,
-            T implementation);
-
-
-    <S extends RpcService, T extends S> ObjectRegistration<T> registerRpcImplementation(Class<S> type,
-            T implementation, Set<InstanceIdentifier<?>> paths);
-
+    /**
+     * Register RPCs combined in a {@link RpcService} interface on a set of datastore context paths.
+     *
+     * @param <R> {@link RpcService} type
+     * @param <I> {@link RpcService} implementation type
+     * @param type {@link RpcService} class
+     * @param implementation implementation object
+     * @param paths Datastore paths to service
+     * @return An {@link ObjectRegistration} controlling unregistration
+     * @throws NullPointerException if any argument is {@code null}
+     */
+    <R extends RpcService, I extends R> ObjectRegistration<I> registerRpcImplementation(Class<R> type, I implementation,
+        Set<InstanceIdentifier<?>> paths);
 }
index af2c44fe92f441601b0b0e162fd12cccd72d2c4f..d99caa550f7cf297c39d38b8cb018144c9ae33ba 100644 (file)
@@ -36,14 +36,14 @@ public class BindingDOMRpcProviderServiceAdapter extends AbstractBindingAdapter<
     }
 
     @Override
-    public <S extends RpcService, T extends S> ObjectRegistration<T> registerRpcImplementation(final Class<S> type,
-            final T implementation) {
+    public <R extends RpcService, I extends R> ObjectRegistration<I> registerRpcImplementation(final Class<R> type,
+            final I implementation) {
         return register(type, implementation, GLOBAL);
     }
 
     @Override
-    public <S extends RpcService, T extends S> ObjectRegistration<T> registerRpcImplementation(final Class<S> type,
-            final T implementation, final Set<InstanceIdentifier<?>> paths) {
+    public <R extends RpcService, I extends R> ObjectRegistration<I> registerRpcImplementation(final Class<R> type,
+            final I implementation, final Set<InstanceIdentifier<?>> paths) {
         return register(type, implementation, toYangInstanceIdentifiers(paths));
     }
 
index 4128d534e5b97a924938e6b35a937180660d1145..6b05221d039a3a22750849bf6e9230a35b4d322f 100644 (file)
@@ -30,14 +30,14 @@ public final class OSGiRpcProviderService extends AbstractAdaptedService<RpcProv
     }
 
     @Override
-    public <S extends RpcService, T extends S> ObjectRegistration<T> registerRpcImplementation(final Class<S> type,
-            final T implementation) {
+    public <R extends RpcService, I extends R> ObjectRegistration<I> registerRpcImplementation(final Class<R> type,
+            final I implementation) {
         return delegate().registerRpcImplementation(type, implementation);
     }
 
     @Override
-    public <S extends RpcService, T extends S> ObjectRegistration<T> registerRpcImplementation(final Class<S> type,
-            final T implementation, final Set<InstanceIdentifier<?>> paths) {
+    public <R extends RpcService, I extends R> ObjectRegistration<I> registerRpcImplementation(final Class<R> type,
+            final I implementation, final Set<InstanceIdentifier<?>> paths) {
         return delegate().registerRpcImplementation(type, implementation, paths);
     }