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;
13 import org.opendaylight.mdsal.binding.javav2.spec.base.Action;
14 import org.opendaylight.mdsal.binding.javav2.spec.base.InstanceIdentifier;
15 import org.opendaylight.mdsal.binding.javav2.spec.base.KeyedInstanceIdentifier;
16 import org.opendaylight.mdsal.binding.javav2.spec.base.ListAction;
17 import org.opendaylight.mdsal.binding.javav2.spec.base.Rpc;
18 import org.opendaylight.mdsal.binding.javav2.spec.base.TreeNode;
19 import org.opendaylight.yangtools.concepts.ObjectRegistration;
22 * Provides ability to register Remote Procedure Call (RPC) and Action service implementations.
23 * The RPCs and Actions are defined in YANG models.
26 public interface RpcActionProviderService {
29 * Returns class representing registration of global RPC.
30 * @param type RPC binding generated interface
31 * @param implementation RPC binding implementation
32 * @param <S> service class type
33 * @param <T> service implementation type
34 * @return returns class representing a RPC registration
36 <S extends Rpc<?, ?>, T extends S> ObjectRegistration<T> registerRpcImplementation(Class<S> type,
40 * Returns class representing registration of global RPC for supported paths.
41 * @param type RPC binding generated interface
42 * @param implementation RPC binding implementation
43 * @param paths set of supported paths
44 * @param <S> service class type
45 * @param <T> service implementation type
46 * @return returns class representing a RPC registration
48 <S extends Rpc<?, ?>, T extends S> ObjectRegistration<T> registerRpcImplementation(Class<S> type,
49 T implementation, Set<InstanceIdentifier<?>> paths);
52 * Returns class representing registration of Action.
53 * @param type Action binding generated interface
54 * @param parent parent node for Action connected to
55 * @param implementation Action binding implementation
56 * @param <S> service class type
57 * @param <P> parent type
58 * @param <T> service implementation type
59 * @return returns class representing a Action registration
61 <S extends Action<? extends TreeNode, ?, ?>, T extends S, P extends TreeNode> ObjectRegistration<T>
62 registerActionImplementation(
63 Class<S> type, InstanceIdentifier<P> parent, T implementation);
66 * Returns class representing registration of ListAction.
67 * @param type ListAction binding generated interface
68 * @param parent parent node for ListAction connected to
69 * @param implementation ListAction binding implementation
70 * @param <S> service class type
71 * @param <P> parent type
73 * @param <T> service implementation type
74 * @return returns class representing a ListAction registration
76 <S extends ListAction<? extends TreeNode, ?, ?>, T extends S, P extends TreeNode, K> ObjectRegistration<T>
77 registerListActionImplementation(
78 Class<S> type, KeyedInstanceIdentifier<P, K> parent, T implementation);