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.dom.broker.impl;
10 import org.opendaylight.controller.sal.core.api.Broker.RoutedRpcRegistration;
11 import org.opendaylight.controller.sal.core.api.RpcImplementation;
12 import org.opendaylight.yangtools.concepts.AbstractObjectRegistration;
13 import org.opendaylight.yangtools.yang.common.QName;
14 import org.opendaylight.yangtools.yang.data.api.InstanceIdentifier;
16 class RoutedRpcRegImpl extends AbstractObjectRegistration<RpcImplementation> implements
17 RoutedRpcRegistration {
19 private final QName type;
20 private final RoutedRpcSelector router;
22 public RoutedRpcRegImpl(final QName rpcType, final RpcImplementation implementation, final RoutedRpcSelector routedRpcSelector) {
23 super(implementation);
25 router = routedRpcSelector;
29 public void registerPath(final QName context, final InstanceIdentifier path) {
30 router.addPath(context, path, this);
34 public void unregisterPath(final QName context, final InstanceIdentifier path) {
35 router.removePath(context, path, this);
39 protected void removeRegistration() {
44 public QName getType() {