2 * Copyright (c) 2015 Cisco Systems, Inc. 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
8 package org.opendaylight.mdsal.binding.api;
10 import com.google.common.collect.ClassToInstanceMap;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.opendaylight.yangtools.concepts.Registration;
14 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
15 import org.opendaylight.yangtools.yang.binding.Rpc;
18 * Provides ability to registered Remote Procedure Call (RPC) service implementations. The RPCs are defined in YANG
21 public interface RpcProviderService extends BindingService {
23 * Register an {@link Rpc} implementation.
25 * @param implementation implementation object
26 * @return A {@link Registration} controlling unregistration
27 * @throws NullPointerException if {@code implementation} is {@code null}
29 @NonNull Registration registerRpcImplementation(Rpc<?, ?> implementation);
32 * Register an {@link Rpc} implementation on a set of datastore context paths.
34 * @param implementation implementation object
35 * @param paths Datastore paths to service
36 * @return A {@link Registration} controlling unregistration
37 * @throws NullPointerException if any argument is {@code null}
39 @NonNull Registration registerRpcImplementation(Rpc<?, ?> implementation, Set<InstanceIdentifier<?>> paths);
42 * Register a set of {@link Rpc} implementations. Note that this method does not support registering multiple
43 * implementations of the same {@link Rpc} and hence we require specifying them through a
44 * {@link ClassToInstanceMap}.
46 * @param implementations implementation objects
47 * @return A {@link Registration} controlling unregistration
48 * @throws NullPointerException if {@code implementations} is {@code null}
50 @NonNull Registration registerRpcImplementations(ClassToInstanceMap<Rpc<?, ?>> implementations);
53 * Register a set of {@link Rpc} implementations on a set of datastore context paths. Note that this method does not
54 * support registering multiple implementations of the same {@link Rpc} and hence we require specifying them through
55 * a {@link ClassToInstanceMap}.
57 * @param implementations implementation objects
58 * @return A {@link Registration} controlling unregistration
59 * @throws NullPointerException if any argument is {@code null}
61 @NonNull Registration registerRpcImplementations(ClassToInstanceMap<Rpc<?, ?>> implementations,
62 Set<InstanceIdentifier<?>> paths);