2 * Copyright (c) 2014 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.sal.core.api;
10 import org.opendaylight.controller.md.sal.common.api.routing.RouteChangePublisher;
11 import org.opendaylight.controller.md.sal.dom.api.DOMService;
12 import org.opendaylight.controller.sal.core.api.Broker.RoutedRpcRegistration;
13 import org.opendaylight.controller.sal.core.api.Broker.RpcRegistration;
14 import org.opendaylight.yangtools.concepts.ListenerRegistration;
15 import org.opendaylight.yangtools.yang.common.QName;
16 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
18 public interface RpcProvisionRegistry extends RpcImplementation, BrokerService, RouteChangePublisher<RpcRoutingContext, YangInstanceIdentifier>, DOMService {
21 * Registers an implementation of the rpc.
24 * The registered rpc functionality will be available to all other
25 * consumers and providers registered to the broker, which are aware of
26 * the {@link QName} assigned to the rpc.
29 * There is no assumption that rpc type is in the set returned by
30 * invoking {@link RpcImplementation#getSupportedRpcs()}. This allows
31 * for dynamic rpc implementations.
35 * @param implementation
36 * Provider's Implementation of the RPC functionality
37 * @throws IllegalArgumentException
38 * If the name of RPC is invalid
40 RpcRegistration addRpcImplementation(QName rpcType, RpcImplementation implementation)
41 throws IllegalArgumentException;
43 ListenerRegistration<RpcRegistrationListener> addRpcRegistrationListener(RpcRegistrationListener listener);
45 RoutedRpcRegistration addRoutedRpcImplementation(QName rpcType, RpcImplementation implementation);
48 * Sets this RoutedRpc Implementation as a delegate rpc provider and will be asked to invoke rpc if the
49 * current provider can't service the rpc request
51 * @param defaultImplementation
52 * Provider's implementation of RPC functionality
54 public void setRoutedRpcDefaultDelegate(RoutedRpcDefaultImplementation defaultImplementation);