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.binding.api;
10 import org.opendaylight.controller.md.sal.common.api.routing.RouteChangePublisher;
11 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RoutedRpcRegistration;
12 import org.opendaylight.controller.sal.binding.api.BindingAwareBroker.RpcRegistration;
13 import org.opendaylight.controller.sal.binding.api.rpc.RpcContextIdentifier;
14 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
15 import org.opendaylight.yangtools.yang.binding.RpcService;
18 * Interface defining provider's access to the Rpc Registry which could be used
19 * to register their implementations of service to the MD-SAL.
24 public interface RpcProviderRegistry extends //
25 RpcConsumerRegistry, //
26 RouteChangePublisher<RpcContextIdentifier, InstanceIdentifier<?>> {
28 * Registers a global RpcService implementation.
31 * @param implementation
34 <T extends RpcService> RpcRegistration<T> addRpcImplementation(Class<T> type, T implementation)
35 throws IllegalStateException;
39 * Register a Routed RpcService where routing is determined on annotated
40 * (in YANG model) context-reference and value of annotated leaf.
43 * Type of RpcService, use generated interface class, not your
44 * implementation class
45 * @param implementation
46 * Implementation of RpcService
47 * @return Registration object for routed Rpc which could be used to unregister
49 * @throws IllegalStateException
51 <T extends RpcService> RoutedRpcRegistration<T> addRoutedRpcImplementation(Class<T> type, T implementation)
52 throws IllegalStateException;