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.controller.md.sal.dom.api;
11 import javax.annotation.Nonnull;
14 * A {@link DOMService} which allows registration of RPC implementations with a conceptual
15 * router. The client counterpart of this service is {@link DOMRpcService}.
17 public interface DOMRpcProviderService extends DOMService {
19 * Register an {@link DOMRpcImplementation} object with this service.
21 * @param implementation RPC implementation, must not be null
22 * @param rpcs Array of supported RPC identifiers. Must not be null, empty, or contain a null element.
23 * Each identifier is added exactly once, no matter how many times it occurs.
24 * @return A {@link DOMRpcImplementationRegistration} object, guaranteed to be non-null.
25 * @throws NullPointerException if implementation or types is null
26 * @throws IllegalArgumentException if types is empty or contains a null element.
28 @Nonnull <T extends DOMRpcImplementation> DOMRpcImplementationRegistration<T> registerRpcImplementation(@Nonnull T implementation, @Nonnull DOMRpcIdentifier... rpcs);
31 * Register an {@link DOMRpcImplementation} object with this service.
33 * @param implementation RPC implementation, must not be null
34 * @param rpcs Set of supported RPC identifiers. Must not be null, empty, or contain a null element.
35 * @return A {@link DOMRpcImplementationRegistration} object, guaranteed to be non-null.
36 * @throws NullPointerException if implementation or types is null
37 * @throws IllegalArgumentException if types is empty or contains a null element.
39 @Nonnull <T extends DOMRpcImplementation> DOMRpcImplementationRegistration<T> registerRpcImplementation(@Nonnull T implementation, @Nonnull Set<DOMRpcIdentifier> rpcs);