fc679007b5fa8106427a166a44e5883fd34fcc0d
[bgpcep.git] / bgp / rib-impl / src / main / resources / org / opendaylight / blueprint / bgp-rib.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   <reference id="BGPExtensionContext" interface="org.opendaylight.protocol.bgp.parser.spi.BGPExtensionConsumerContext"/>
6   <reference id="globalBossGroup" interface="io.netty.channel.EventLoopGroup" odl:type="global-boss-group"/>
7   <reference id="globalWorkerGroup" interface="io.netty.channel.EventLoopGroup" odl:type="global-worker-group"/>
8   <reference id="clusterSingletonServiceProvider" interface="org.opendaylight.mdsal.singleton.common.api.ClusterSingletonServiceProvider"/>
9
10   <bean id="BGPPeerRegistry" class="org.opendaylight.protocol.bgp.rib.impl.StrictBGPPeerRegistry"
11           factory-method="instance" destroy-method="close"/>
12
13   <service ref="BGPPeerRegistry" interface="org.opendaylight.protocol.bgp.rib.impl.spi.BGPPeerRegistry"
14           odl:type="default">
15     <!-- The following service properties specify the config system module and instance that correspond to
16          this OSGi service which enables the config system module to be restarted when this blueprint
17          container is restarted. -->
18     <service-properties>
19       <entry key="config-module-namespace" value="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl"/>
20       <entry key="config-module-name" value="strict-bgp-peer-registry"/>
21       <entry key="config-instance-name" value="global-bgp-peer-registry"/>
22     </service-properties>
23   </service>
24
25   <bean id="BGPDispatcher" class="org.opendaylight.protocol.bgp.rib.impl.BGPDispatcherImpl"  destroy-method="close">
26     <argument>
27       <bean factory-ref="BGPExtensionContext" factory-method="getMessageRegistry"/>
28     </argument>
29     <argument ref="globalBossGroup"/>
30     <argument ref="globalWorkerGroup"/>
31     <argument ref="BGPPeerRegistry"/>
32   </bean>
33
34   <service ref="BGPDispatcher" interface="org.opendaylight.protocol.bgp.rib.impl.spi.BGPDispatcher">
35     <!-- The following service properties specify the config system module and instance that correspond to
36          this OSGi service which enables the config system module to be restarted when this blueprint
37          container is restarted. -->
38     <service-properties>
39       <entry key="config-module-namespace" value="urn:opendaylight:params:xml:ns:yang:controller:bgp:rib:impl"/>
40       <entry key="config-module-name" value="bgp-dispatcher-impl"/>
41       <entry key="config-instance-name" value="global-bgp-dispatcher"/>
42     </service-properties>
43   </service>
44
45   <reference id="dataBroker" interface="org.opendaylight.controller.md.sal.binding.api.DataBroker" odl:type="pingpong"/>
46   <reference id="globalBgpExtensions" interface="org.opendaylight.protocol.bgp.rib.spi.RIBExtensionConsumerContext"/>
47   <reference id="codecTreeFactory" interface="org.opendaylight.mdsal.binding.dom.codec.api.BindingCodecTreeFactory"/>
48   <reference id="domDataBroker" interface="org.opendaylight.controller.md.sal.dom.api.DOMDataBroker" odl:type="pingpong"/>
49   <reference id="bgpTableTypeRegistry" interface="org.opendaylight.protocol.bgp.openconfig.spi.BGPTableTypeRegistryConsumer"/>
50   <odl:static-reference id="domSchemaService" interface="org.opendaylight.mdsal.dom.api.DOMSchemaService"/>
51   <reference id="rpcRegistry" interface="org.opendaylight.controller.sal.binding.api.RpcProviderRegistry"/>
52
53   <bean id="bgpDeployer" class="org.opendaylight.protocol.bgp.rib.impl.config.BgpDeployerImpl"  destroy-method="close">
54     <argument value="global-bgp"/>
55     <argument ref="blueprintContainer"/>
56     <argument ref="blueprintBundleContext"/>
57     <argument ref="dataBroker"/>
58     <argument ref="bgpTableTypeRegistry"/>
59   </bean>
60
61   <service ref="bgpDeployer" interface="org.opendaylight.protocol.bgp.rib.impl.spi.BgpDeployer"/>
62
63   <bean id="ribImpl" class="org.opendaylight.protocol.bgp.rib.impl.config.RibImpl" scope="prototype">
64     <argument ref="clusterSingletonServiceProvider"/>
65     <argument ref="globalBgpExtensions"/>
66     <argument ref="BGPDispatcher"/>
67     <argument ref="codecTreeFactory"/>
68     <argument ref="domDataBroker"/>
69     <argument ref="domSchemaService"/>
70   </bean>
71
72   <bean id="bgpPeer" class="org.opendaylight.protocol.bgp.rib.impl.config.BgpPeer" scope="prototype">
73     <argument ref="rpcRegistry"/>
74   </bean>
75
76   <bean id="appPeer" class="org.opendaylight.protocol.bgp.rib.impl.config.AppPeer" scope="prototype"/>
77
78   <reference id="bgpConfigLoader" interface="org.opendaylight.protocol.bgp.config.loader.spi.ConfigLoader"/>
79
80   <bean id="protocolsInitialConfig" class="org.opendaylight.protocol.bgp.rib.impl.ProtocolsConfigFileProcessor"
81         destroy-method="close">
82       <argument ref="bgpConfigLoader"/>
83       <argument ref="bgpDeployer"/>
84   </bean>
85
86   <bean id="bgpStateCollector" class="org.opendaylight.protocol.bgp.rib.impl.state.BGPStateCollectorImpl"/>
87   <service ref="bgpStateCollector" interface="org.opendaylight.protocol.bgp.rib.spi.state.BGPStateConsumer"/>
88
89   <reference-list id="ribStatsListener" interface="org.opendaylight.protocol.bgp.rib.spi.state.BGPRIBStateConsumer"
90     availability="optional">
91       <reference-listener bind-method="bind" unbind-method="unbind">
92           <ref component-id="bgpStateCollector"/>
93       </reference-listener>
94   </reference-list>
95
96   <reference-list id="peersStatsListener" interface="org.opendaylight.protocol.bgp.rib.spi.state.BGPPeerStateConsumer"
97                   availability="optional">
98       <reference-listener bind-method="bind" unbind-method="unbind">
99           <ref component-id="bgpStateCollector"/>
100       </reference-listener>
101   </reference-list>
102 </blueprint>