f1438c650e6b3bdffa841873dfcef9ac158c2ab4
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / main / resources / org / opendaylight / blueprint / binding-broker.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
3            xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0">
4
5   <!-- Runtime binding/normalized mapping service -->
6
7   <reference id="classLoadingStrategy" interface="org.opendaylight.yangtools.sal.binding.generator.api.ClassLoadingStrategy"/>
8   <reference id="schemaService" interface="org.opendaylight.controller.sal.core.api.model.SchemaService" />
9
10   <bean id="mappingCodec" class="org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodecFactory"
11          factory-method="newInstance">
12     <argument ref="classLoadingStrategy"/>
13   </bean>
14
15   <!-- Register the BindingToNormalizedNodeCodec with the SchemaService as a SchemaContextListener -->
16   <bean id="mappingCodecListenerReg" class="org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodecFactory"
17          factory-method="registerInstance" destroy-method="close">
18     <argument ref="mappingCodec"/>
19     <argument ref="schemaService"/>
20   </bean>
21
22   <service ref="mappingCodec" odl:type="default">
23     <interfaces>
24       <value>org.opendaylight.yangtools.binding.data.codec.api.BindingCodecTreeFactory</value>
25       <value>org.opendaylight.yangtools.binding.data.codec.api.BindingNormalizedNodeSerializer</value>
26       <value>org.opendaylight.mdsal.binding.dom.codec.api.BindingNormalizedNodeSerializer</value>
27       <value>org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTreeFactory</value>
28     </interfaces>
29   </service>
30
31   <!-- We also register the BindingToNormalizedNodeCodec with its actual class name for
32        backwards compatibility for CSS users that inject the binding-dom-mapping-service -->
33   <bean id="mappingCodecServiceReg" class="org.opendaylight.controller.md.sal.binding.impl.BindingToNormalizedNodeCodecFactory"
34          factory-method="registerOSGiService" destroy-method="unregister">
35     <argument ref="mappingCodec"/>
36     <argument ref="blueprintBundleContext"/>
37   </bean>
38
39   <!-- Binding RPC Registry Service -->
40
41   <reference id="domRpcService" interface="org.opendaylight.controller.md.sal.dom.api.DOMRpcService"/>
42
43   <bean id="bindingRpcServiceAdapter" class="org.opendaylight.controller.md.sal.binding.impl.BindingDOMRpcServiceAdapter" >
44     <argument ref="domRpcService"/>
45     <argument ref="mappingCodec"/>
46   </bean>
47
48   <reference id="domRpcRegistry" interface="org.opendaylight.controller.md.sal.dom.api.DOMRpcProviderService"/>
49
50   <bean id="bindingRpcProviderAdapter" class="org.opendaylight.controller.md.sal.binding.impl.BindingDOMRpcProviderServiceAdapter" >
51     <argument ref="domRpcRegistry"/>
52     <argument ref="mappingCodec"/>
53   </bean>
54
55   <bean id="bindingRpcRegistry" class="org.opendaylight.controller.md.sal.binding.compat.HeliumRpcProviderRegistry" >
56     <argument ref="bindingRpcServiceAdapter"/>
57     <argument ref="bindingRpcProviderAdapter"/>
58   </bean>
59
60   <service ref="bindingRpcRegistry" interface="org.opendaylight.controller.sal.binding.api.RpcProviderRegistry"
61           odl:type="default"/>
62
63   <!-- Binding MountPoint Service -->
64
65   <reference id="domMountPointService" interface="org.opendaylight.controller.md.sal.dom.api.DOMMountPointService"/>
66
67   <bean id="bindingMountPointService" class="org.opendaylight.controller.md.sal.binding.impl.BindingDOMMountPointServiceAdapter" >
68     <argument ref="domMountPointService"/>
69     <argument ref="mappingCodec"/>
70   </bean>
71
72   <service ref="bindingMountPointService" interface="org.opendaylight.controller.md.sal.binding.api.MountPointService"
73           odl:type="default"/>
74
75   <!-- Binding Notification Service -->
76
77   <reference id="domNotificationService" interface="org.opendaylight.controller.md.sal.dom.api.DOMNotificationService"/>
78
79   <bean id="bindingNotificationServiceAdapter" class="org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationServiceAdapter">
80     <argument>
81       <bean factory-ref="mappingCodec" factory-method="getCodecRegistry"/>
82     </argument>
83     <argument ref="domNotificationService"/>
84   </bean>
85
86   <service ref="bindingNotificationServiceAdapter" interface="org.opendaylight.controller.md.sal.binding.api.NotificationService"
87           odl:type="default"/>
88
89   <reference id="domNotificationPublishService" interface="org.opendaylight.controller.md.sal.dom.api.DOMNotificationPublishService"/>
90
91   <bean id="bindingNotificationPublishAdapter" class="org.opendaylight.controller.md.sal.binding.impl.BindingDOMNotificationPublishServiceAdapter">
92     <argument ref="mappingCodec"/>
93     <argument ref="domNotificationPublishService"/>
94   </bean>
95
96   <service ref="bindingNotificationPublishAdapter" interface="org.opendaylight.controller.md.sal.binding.api.NotificationPublishService"
97           odl:type="default"/>
98
99   <reference id="domNotificationListenerRegistry" interface="org.opendaylight.controller.md.sal.dom.spi.DOMNotificationSubscriptionListenerRegistry"/>
100
101   <bean id="bindingNotificationProviderService" class="org.opendaylight.controller.md.sal.binding.compat.HeliumNotificationProviderServiceWithInterestListeners">
102     <argument ref="bindingNotificationPublishAdapter"/>
103     <argument ref="bindingNotificationServiceAdapter"/>
104     <argument ref="domNotificationListenerRegistry"/>
105   </bean>
106
107   <service ref="bindingNotificationProviderService" odl:type="default">
108     <interfaces>
109       <value>org.opendaylight.controller.sal.binding.api.NotificationProviderService</value>
110       <value>org.opendaylight.controller.sal.binding.api.NotificationService</value>
111     </interfaces>
112   </service>
113
114   <!-- Binding DataBroker -->
115
116   <reference id="domDefaultDataBroker" interface="org.opendaylight.controller.md.sal.dom.api.DOMDataBroker"
117           odl:type="default"/>
118
119   <bean id="bindingDataBroker" class="org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataBrokerAdapter">
120     <argument ref="domDefaultDataBroker"/>
121     <argument ref="mappingCodec"/>
122   </bean>
123
124   <service ref="bindingDataBroker" interface="org.opendaylight.controller.md.sal.binding.api.DataBroker"
125           odl:type="default"/>
126
127   <!-- Binding PingPong DataBroker -->
128
129   <reference id="domPingPongDataBroker" interface="org.opendaylight.controller.md.sal.dom.api.DOMDataBroker"
130           odl:type="pingpong"/>
131
132   <bean id="bindingPingPongDataBroker" class="org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataBrokerAdapter">
133     <argument ref="domPingPongDataBroker"/>
134     <argument ref="mappingCodec"/>
135   </bean>
136
137   <service ref="bindingPingPongDataBroker" interface="org.opendaylight.controller.md.sal.binding.api.DataBroker"
138           odl:type="pingpong"/>
139
140 </blueprint>

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.