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=38b33d5d2a509f228a3fcc88a28c3b4f64a11dad;hb=c0b10c35abcdf8038546aa89bf29264720f12a75;hp=0299505cdeee6bcef00315507012cbd030f384c1;hpb=738d46bed116293e3e42171ad2035ab805b0b2be;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 0299505cde..38b33d5d2a 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
@@ -15,12 +15,14 @@ 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 rpc.
- *
- * In order to expose the rpc to other components, the provider MUST register
- * concrete implementation of this interface
- *
+ * {@link Provider}'s implementation of an RPC.
+ *
+ * In order to expose an RPC to other components, the provider MUST register
+ * a concrete implementation of this interface.
+ *
* The registration could be done by :
*
* - returning an instance of implementation in the return value of
@@ -29,9 +31,9 @@ import org.opendaylight.yangtools.yang.data.api.CompositeNode;
* arguments to the
* {@link ProviderSession#addRpcImplementation(QName, RpcImplementation)}
*
- *
+ *
* The simplified process of the invocation of rpc is following:
- *
+ *
*
* - {@link Consumer} invokes
* {@link ConsumerSession#rpc(QName, CompositeNode)}
@@ -42,40 +44,37 @@ 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 {
/**
* A set of rpc types supported by implementation.
- *
+ *
* The set of rpc {@link QName}s which are supported by this implementation.
* This set is used, when {@link Provider} is registered to the SAL, to
* register and expose the implementation of the returned rpcs.
- *
+ *
* @return Set of QNames identifying supported RPCs
*/
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
*
* - If rpc is null.
*
- 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);
}