X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-dom-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fcore%2Fapi%2FRpcImplementation.java;h=d14910055b6a8ff2f72805599588060dc7f663c6;hb=c1362c86eb19e92e6c64d10099a45deb499c6db1;hp=6b1030a81500f5a909d6df30f69e52208025c482;hpb=6623a8370580d5210be559299e165c96d4097fe2;p=controller.git
diff --git a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/RpcImplementation.java b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/RpcImplementation.java
index 6b1030a815..d14910055b 100644
--- a/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/RpcImplementation.java
+++ b/opendaylight/md-sal/sal-dom-api/src/main/java/org/opendaylight/controller/sal/core/api/RpcImplementation.java
@@ -9,12 +9,12 @@ package org.opendaylight.controller.sal.core.api;
import java.util.Set;
-import org.opendaylight.controller.sal.core.api.Broker.ConsumerSession;
-import org.opendaylight.controller.sal.core.api.Broker.ProviderSession;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.common.RpcResult;
import org.opendaylight.yangtools.yang.data.api.CompositeNode;
+import com.google.common.util.concurrent.ListenableFuture;
+
/**
* {@link Provider}'s implementation of an RPC.
*
@@ -27,14 +27,14 @@ import org.opendaylight.yangtools.yang.data.api.CompositeNode;
* {@link Provider#getProviderFunctionality()}
*
passing an instance of implementation and {@link QName} of rpc as
* arguments to the
- * {@link ProviderSession#addRpcImplementation(QName, RpcImplementation)}
+ * {@link org.opendaylight.controller.sal.core.api.Broker.ProviderSession#addRpcImplementation(QName, RpcImplementation)}
*
*
* The simplified process of the invocation of rpc is following:
*
*
* - {@link Consumer} invokes
- * {@link ConsumerSession#rpc(QName, CompositeNode)}
+ * {@link org.opendaylight.controller.sal.core.api.Broker.ConsumerSession#rpc(QName, CompositeNode)}
*
- {@link Broker} finds registered {@link RpcImplementation}s
*
- {@link Broker} invokes
* {@link RpcImplementation#invokeRpc(QName, CompositeNode)}
@@ -42,8 +42,6 @@ import org.opendaylight.yangtools.yang.data.api.CompositeNode;
* {@link RpcResult}
*
- {@link Broker} returns the {@link RpcResult} to {@link Consumer}
*
- *
- *
*/
public interface RpcImplementation extends Provider.ProviderFunctionality {
@@ -59,13 +57,12 @@ public interface RpcImplementation extends Provider.ProviderFunctionality {
Set getSupportedRpcs();
/**
- * Invokes a implementation of specified rpc.
- *
+ * Invokes a implementation of specified RPC asynchronously.
*
* @param rpc
- * Rpc to be invoked
+ * RPC to be invoked
* @param input
- * Input data for rpc.
+ * Input data for the RPC.
*
* @throws IllegalArgumentException
*
@@ -73,9 +70,9 @@ public interface RpcImplementation extends Provider.ProviderFunctionality {
* - If input is not
null
and
* false == rpc.equals(input.getNodeType)
*
- * @return RpcResult containing the output of rpc if was executed
- * successfully, the list of errors otherwise.
+ * @return Future promising an RpcResult containing the output of
+ * the RPC if was executed successfully, the list of errors
+ * otherwise.
*/
- RpcResult invokeRpc(QName rpc, CompositeNode input);
-
+ ListenableFuture> invokeRpc(QName rpc, CompositeNode input);
}