import org.opendaylight.controller.md.sal.dom.api.DOMRpcResult;
import org.opendaylight.controller.md.sal.dom.api.DOMRpcService;
import org.opendaylight.controller.md.sal.dom.spi.AbstractDOMRpcImplementationRegistration;
+import org.opendaylight.controller.sal.core.api.model.SchemaService;
import org.opendaylight.yangtools.concepts.AbstractListenerRegistration;
import org.opendaylight.yangtools.concepts.ListenerRegistration;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
private Collection<ListenerRegistration<? extends DOMRpcAvailabilityListener>> listeners = Collections.emptyList();
private volatile DOMRpcRoutingTable routingTable = DOMRpcRoutingTable.EMPTY;
+ public static DOMRpcRouter newInstance(SchemaService schemaService) {
+ final DOMRpcRouter rpcRouter = new DOMRpcRouter();
+ schemaService.registerSchemaContextListener(rpcRouter);
+ return rpcRouter;
+ }
+
@Override
public <T extends DOMRpcImplementation> DOMRpcImplementationRegistration<T> registerRpcImplementation(final T implementation, final DOMRpcIdentifier... rpcs) {
return registerRpcImplementation(implementation, ImmutableSet.copyOf(rpcs));
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+ xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
+ xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
+ odl:restart-dependents-on-updates="true">
+
+ <cm:property-placeholder persistent-id="org.opendaylight.mdsal.dom.notification" update-strategy="none">
+ <cm:default-properties>
+ <cm:property name="notification-queue-depth" value="65536"/>
+ <cm:property name="notification-queue-spin" value="0"/>
+ <cm:property name="notification-queue-park" value="0"/>
+ </cm:default-properties>
+ </cm:property-placeholder>
+
+ <!-- Schema Service -->
+
+ <bean id="schemaServiceImpl" class="org.opendaylight.controller.sal.dom.broker.GlobalBundleScanningSchemaServiceImpl"
+ factory-method="getInstance" />
+
+ <service ref="schemaServiceImpl">
+ <interfaces>
+ <value>org.opendaylight.controller.sal.core.api.model.SchemaService</value>
+ <value>org.opendaylight.controller.sal.core.api.model.YangTextSourceProvider</value>
+ </interfaces>
+ </service>
+
+ <!-- DOM Notification Service -->
+
+ <bean id="domNotificationRouter" class="org.opendaylight.controller.md.sal.dom.broker.impl.DOMNotificationRouter"
+ factory-method="create">
+ <argument value="${notification-queue-depth}"/>
+ <argument value="${notification-queue-spin}"/>
+ <argument value="${notification-queue-park}"/>
+ <argument value="MILLISECONDS"/>
+ </bean>
+
+ <service ref="domNotificationRouter" odl:type="default">
+ <interfaces>
+ <value>org.opendaylight.controller.md.sal.dom.api.DOMNotificationService</value>
+ <value>org.opendaylight.controller.md.sal.dom.api.DOMNotificationPublishService</value>
+ <value>org.opendaylight.controller.md.sal.dom.spi.DOMNotificationSubscriptionListenerRegistry</value>
+ </interfaces>
+ </service>
+
+ <!-- DOM RPC Service -->
+
+ <bean id="domRpcRouter" class="org.opendaylight.controller.md.sal.dom.broker.impl.DOMRpcRouter"
+ factory-method="newInstance">
+ <argument ref="schemaServiceImpl"/>
+ </bean>
+
+ <service ref="domRpcRouter" odl:type="default">
+ <interfaces>
+ <value>org.opendaylight.controller.md.sal.dom.api.DOMRpcService</value>
+ <value>org.opendaylight.controller.md.sal.dom.api.DOMRpcProviderService</value>
+ </interfaces>
+ </service>
+
+ <!-- DOM MountPoint Service -->
+
+ <bean id="domMountPointService" class="org.opendaylight.controller.md.sal.dom.broker.impl.mount.DOMMountPointServiceImpl"/>
+
+ <service ref="domMountPointService" interface="org.opendaylight.controller.md.sal.dom.api.DOMMountPointService"
+ odl:type="default"/>
+
+ <!-- DOM PingPong Data Broker -->
+
+ <reference id="domDefaultDataBroker" interface="org.opendaylight.controller.md.sal.dom.api.DOMDataBroker"
+ odl:type="default"/>
+
+ <bean id="domPingPongDataBroker" class="org.opendaylight.controller.md.sal.dom.broker.impl.PingPongDataBroker">
+ <argument ref="domDefaultDataBroker"/>
+ </bean>
+
+ <service ref="domPingPongDataBroker" interface="org.opendaylight.controller.md.sal.dom.api.DOMDataBroker"
+ odl:type="pingpong"/>
+
+</blueprint>