Bulk-add copyright headers to java files
[controller.git] / opendaylight / md-sal / sal-dom-api / src / main / java / org / opendaylight / controller / sal / core / api / RpcProvisionRegistry.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.sal.core.api;
9
10 import org.opendaylight.controller.md.sal.common.api.routing.RouteChangePublisher;
11 import org.opendaylight.controller.sal.core.api.Broker.RoutedRpcRegistration;
12 import org.opendaylight.controller.sal.core.api.Broker.RpcRegistration;
13 import org.opendaylight.yangtools.concepts.ListenerRegistration;
14 import org.opendaylight.yangtools.yang.common.QName;
15 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
16
17 public interface RpcProvisionRegistry extends BrokerService, RouteChangePublisher<RpcRoutingContext, InstanceIdentifier> {
18
19     /**
20      * Registers an implementation of the rpc.
21      * 
22      * <p>
23      * The registered rpc functionality will be available to all other
24      * consumers and providers registered to the broker, which are aware of
25      * the {@link QName} assigned to the rpc.
26      * 
27      * <p>
28      * There is no assumption that rpc type is in the set returned by
29      * invoking {@link RpcImplementation#getSupportedRpcs()}. This allows
30      * for dynamic rpc implementations.
31      * 
32      * @param rpcType
33      *            Name of Rpc
34      * @param implementation
35      *            Provider's Implementation of the RPC functionality
36      * @throws IllegalArgumentException
37      *             If the name of RPC is invalid
38      */
39     RpcRegistration addRpcImplementation(QName rpcType, RpcImplementation implementation)
40             throws IllegalArgumentException;
41     
42     ListenerRegistration<RpcRegistrationListener> addRpcRegistrationListener(RpcRegistrationListener listener);
43
44     RoutedRpcRegistration addRoutedRpcImplementation(QName rpcType, RpcImplementation implementation);
45 }