50f1b64e5c21acd92026fcc2f9fb1346bf996d08
[bgpcep.git] / pcep / topology / topology-stats / src / main / resources / OSGI-INF / blueprint / pcep-stats.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3   ~ Copyright (c) 2017. AT&T Intellectual Property. All rights reserved.
4   ~
5   ~  This program and the accompanying materials are made available under the
6   ~  terms of the Eclipse Public License v1.0 which accompanies this distribution,
7   ~  and is available at http://www.eclipse.org/legal/epl-v10.html
8   -->
9
10 <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
11            xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0">
12     <reference id="dataBroker" interface="org.opendaylight.mdsal.binding.api.DataBroker"/>
13     <odl:clustered-app-config id="pcepStatsConfig"
14         binding-class="org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.odl.pcep.stats.provider.config.rev171113.PcepProvider"/>
15
16     <bean id="topologyStatsRpcService"
17           class="org.opendaylight.bgpcep.pcep.topology.stats.rpc.TopologyStatsRpcServiceImpl"
18           init-method="init" destroy-method="close">
19         <argument ref="dataBroker"/>
20     </bean>
21     <odl:rpc-implementation ref="topologyStatsRpcService"/>
22
23     <bean id="timer" class="java.util.Timer" destroy-method="cancel">
24         <argument value="pcep-topology-stats-timer"/>
25         <argument value="true"/>
26     </bean>
27
28     <bean id="topologyStatsRegistry"
29           class="org.opendaylight.bgpcep.pcep.topology.stats.provider.TopologyStatsProviderImpl"
30           factory-method="createStarted" destroy-method="close">
31         <argument ref="dataBroker"/>
32         <argument ref="timer"/>
33         <argument>
34             <bean factory-ref="pcepStatsConfig" factory-method="getTimer"/>
35         </argument>
36     </bean>
37     <service ref="topologyStatsRegistry"
38              interface="org.opendaylight.bgpcep.pcep.topology.spi.stats.TopologySessionStatsRegistry"/>
39 </blueprint>