X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fbinding%2Fapi%2FRpcConsumerRegistry.java;h=3967ff1c4421fbd77386199d956c81119f70ce94;hb=e2607370f5ac443a5a2f1f00f693f82a0b57161d;hp=0c5e7649f865403eb2a3c9903ff30223767d6f38;hpb=d8d8f731bbe6c58fcbd0e616734e2e230aaf4ab4;p=controller.git diff --git a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/RpcConsumerRegistry.java b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/RpcConsumerRegistry.java index 0c5e7649f8..3967ff1c44 100644 --- a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/RpcConsumerRegistry.java +++ b/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/RpcConsumerRegistry.java @@ -13,6 +13,7 @@ import org.opendaylight.yangtools.yang.binding.RpcService; /** * Provides access to registered Remote Procedure Call (RPC) service implementations. The RPCs are * defined in YANG models. + * *
* RPC implementations are registered using the {@link RpcProviderRegistry}. * @@ -45,23 +46,25 @@ public interface RpcConsumerRegistry extends BindingAwareService, BindingService * RPC methods may be implemented asynchronously, callers should avoid blocking on the * {@link java.util.concurrent.Future Future} result. Instead, it is recommended to use * {@link com.google.common.util.concurrent.JdkFutureAdapters#listenInPoolThread(java.util.concurrent.Future)} - * or {@link com.google.common.util.concurrent.JdkFutureAdapters#listenInPoolThread(java.util.concurrent.Future, java.util.concurrent.Executor)} + * or {@link com.google.common.util.concurrent.JdkFutureAdapters#listenInPoolThread(java.util.concurrent.Future, + * java.util.concurrent.Executor)} * to listen for Rpc Result. This will asynchronously listen for future result in executor and * will not block current thread. * - *
+ * {@code * final Future* @param serviceInterface the interface of the RPC Service. Typically this is an interface generated * from a YANG model. * @return the proxy for the requested RPC service. This method never returns null.> future = someRpcService.someRpc( ... ); - * Futures.addCallback(JdkFutureAdapters.listenInThreadPool(future), new FutureCallback >() { + * Futures.addCallback(JdkFutureAdapters.listenInThreadPool(future), + * new FutureCallback >() { + * public void onSuccess(RpcResult result) { + * // process result ... + * } * - * public void onSuccess(RpcResult result) { - * // process result ... - * } + * public void onFailure(Throwable t) { + * // RPC failed + * } + * }); + * } * - * public void onFailure(Throwable t) { - * // RPC failed - * } - * ); - *