X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-binding-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fsal%2Fbinding%2Fapi%2FRpcConsumerRegistry.java;h=e0603602b70d8000c2d8916b60e60dd9f0802041;hp=615acd3195c8a99ed5b5f372f53dee46d5faac7b;hb=HEAD;hpb=cbe83ca3074fa0182d4f079f528bb710a997ced7 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 deleted file mode 100644 index 615acd3195..0000000000 --- a/opendaylight/md-sal/sal-binding-api/src/main/java/org/opendaylight/controller/sal/binding/api/RpcConsumerRegistry.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v1.0 which accompanies this distribution, - * and is available at http://www.eclipse.org/legal/epl-v10.html - */ -package org.opendaylight.controller.sal.binding.api; - -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}. - * - */ -public interface RpcConsumerRegistry extends BindingAwareService { - /** - * Returns an implementation of a requested RPC service. - * - *

- * The returned instance is not an actual implementation of the RPC service - * interface, but a proxy implementation of the interface that forwards to - * an actual implementation, if any. - *

- * - * The following describes the behavior of the proxy when invoking RPC methods: - *

- * - * The returned proxy is automatically updated with the most recent - * registered implementation. - *

- * The generated RPC method APIs require implementors to return a {@link java.util.concurrent.Future Future} - * instance that wraps the {@link org.opendaylight.yangtools.yang.common.RpcResult RpcResult}. Since - * 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)} - * to listen for Rpc Result. This will asynchronously listen for future result in executor and - * will not block current thread. - * - *

-     *   final Future> future = someRpcService.someRpc( ... );
-     *   Futures.addCallback(JdkFutureAdapters.listenInThreadPool(future), new FutureCallback>() {
-     *
-     *       public void onSuccess(RpcResult result) {
-     *          // process result ...
-     *       }
-     *
-     *       public void onFailure(Throwable t) {
-     *          // RPC failed
-     *       }
-     *   );
-     * 
- * @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. - */ - T getRpcService(Class serviceInterface); -}