2 * Copyright (c) 2013 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.spi;
10 import org.opendaylight.controller.yang.binding.DataObject;
11 import org.opendaylight.controller.yang.binding.RpcService;
12 import org.opendaylight.controller.yang.common.QName;
13 import org.opendaylight.controller.yang.data.api.CompositeNode;
15 public interface MappingProvider {
17 <T extends DataObject> Mapper<T> mapperForClass(Class<T> type);
18 Mapper<DataObject> mapperForQName(QName name);
21 * Returns {@link RpcMapper} associated to class
23 * @param type Class for which RpcMapper should provide mapping
26 <T extends RpcService> RpcMapper<T> rpcMapperForClass(Class<T> type);
29 * Returns {@link RpcMapper} associated to the {@link RpcService} proxy.
34 RpcMapper<? extends RpcService> rpcMapperForProxy(RpcService proxy);
43 RpcMapper<? extends RpcService> rpcMapperForData(QName rpc,
44 CompositeNode inputNode);
46 <T extends MappingExtension> MappingExtensionFactory<T> getExtensionFactory(Class<T> cls);
48 public interface MappingExtension {
52 public interface MappingExtensionFactory<T> {
53 T forClass(Class<?> obj);