2 * Copyright (c) 2017 Pantheon Technologies s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.mdsal.binding.javav2.api;
11 import com.google.common.annotations.Beta;
12 import org.opendaylight.mdsal.binding.javav2.spec.base.Action;
13 import org.opendaylight.mdsal.binding.javav2.spec.base.ListAction;
14 import org.opendaylight.mdsal.binding.javav2.spec.base.Rpc;
15 import org.opendaylight.mdsal.binding.javav2.spec.base.TreeNode;
18 * Provides access to registered Remote Procedure Call (RPC) and Action service implementations.
19 * RPCs and Actions are defined in YANG models.
22 * RPC/Action implementations are registered using the {@link RpcActionProviderService}.
25 public interface RpcActionConsumerRegistry extends BindingService {
28 * Returns an implementation of a requested RPC service.
31 * The returned instance is not an actual implementation of the RPC service interface, but a
32 * proxy implementation of the interface that forwards to an actual implementation, if any.
34 * @param serviceInterface given service interface
35 * @param <T> interface type
36 * @return returns proxy for the requested RPC
38 <T extends Rpc<?, ?>> T getRpcService(Class<T> serviceInterface);
41 * Returns an implementation of a requested Action service.
44 * The returned instance is not an actual implementation of the Action service interface, but a
45 * proxy implementation of the interface that forwards to an actual implementation, if any.
47 * @param serviceInterface given service interface
48 * @param <T> interface type
49 * @return returns proxy for the requested Action
51 <T extends Action<? extends TreeNode, ?, ?>> T getActionService(Class<T> serviceInterface);
54 * Returns an implementation of a requested ListAction service.
57 * The returned instance is not an actual implementation of the ListAction service interface, but a
58 * proxy implementation of the interface that forwards to an actual implementation, if any.
60 * @param serviceInterface given service interface
61 * @param <T> interface type
62 * @return returns proxy for the requested ListAction
64 <T extends ListAction<? extends TreeNode, ?, ?>> T getListActionService(Class<T> serviceInterface);