Remove DOMDataTreeCommitCohortRegistration
[mdsal.git] / dom / mdsal-dom-api / src / main / java / org / opendaylight / mdsal / dom / api / DOMRpcService.java
index b16ba74c895c8ba38d02cc1bb15d5af1d5647465..6d7fffb3ba4219d1726d22f5c2c2e629838255a7 100644 (file)
@@ -9,7 +9,7 @@ package org.opendaylight.mdsal.dom.api;
 
 import com.google.common.util.concurrent.ListenableFuture;
 import org.eclipse.jdt.annotation.NonNull;
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
+import org.opendaylight.yangtools.concepts.Registration;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
 
@@ -19,7 +19,14 @@ import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
  * to track the process of RPCs becoming available.
  */
 // FIXME: once we have a DOMOperationService implementation, deprecate this interface
-public interface DOMRpcService extends DOMService {
+public interface DOMRpcService extends DOMService<DOMRpcService, DOMRpcService.Extension> {
+    /**
+     * Marker interface for an extension to {@link DOMRpcService}.
+     */
+    interface Extension extends DOMService.Extension<DOMRpcService, Extension> {
+        // Marker interface
+    }
+
     /**
      * Initiate invocation of an RPC. This method is guaranteed to not block on any external
      * resources.
@@ -42,8 +49,8 @@ public interface DOMRpcService extends DOMService {
      * occurring.
      *
      * @param listener {@link DOMRpcAvailabilityListener} instance to register
-     * @return A {@link ListenerRegistration} representing this registration. Performing a
-     *         {@link ListenerRegistration#close()} will cancel it. Returned object is guaranteed to be non-null.
+     * @return A {@link Registration} representing this registration. Performing a {@link Registration#close()} will
+     *         cancel it. Returned object is guaranteed to be non-null.
      */
-    @NonNull <T extends DOMRpcAvailabilityListener> ListenerRegistration<T> registerRpcListener(@NonNull T listener);
+    @NonNull Registration registerRpcListener(@NonNull DOMRpcAvailabilityListener listener);
 }