import org.opendaylight.controller.md.sal.dom.broker.impl.DOMDataBrokerImpl;
import org.opendaylight.controller.md.sal.dom.broker.impl.compat.BackwardsCompatibleDataBroker;
import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore;
import org.opendaylight.controller.md.sal.dom.broker.impl.DOMDataBrokerImpl;
import org.opendaylight.controller.md.sal.dom.broker.impl.compat.BackwardsCompatibleDataBroker;
import org.opendaylight.controller.md.sal.dom.store.impl.InMemoryDOMDataStore;
protected BindingTestContext(final ListeningExecutorService executor, final ClassPool classPool, final boolean startWithSchema) {
this.executor = executor;
this.classPool = classPool;
protected BindingTestContext(final ListeningExecutorService executor, final ClassPool classPool, final boolean startWithSchema) {
this.executor = executor;
this.classPool = classPool;
checkState(executor != null, "Executor needs to be set");
baDataImpl = new DataBrokerImpl();
baDataImpl.setExecutor(executor);
checkState(executor != null, "Executor needs to be set");
baDataImpl = new DataBrokerImpl();
baDataImpl.setExecutor(executor);
}
public void startBindingBroker() {
checkState(executor != null, "Executor needs to be set");
}
public void startBindingBroker() {
checkState(executor != null, "Executor needs to be set");
checkState(baNotifyImpl != null, "Notification Service must be started");
baBrokerImpl = new DomForwardedBindingBrokerImpl("test");
baBrokerImpl.getMountManager().setDataCommitExecutor(executor);
baBrokerImpl.getMountManager().setNotificationExecutor(executor);
baBrokerImpl.setRpcBroker(new RpcProviderRegistryImpl("test"));
checkState(baNotifyImpl != null, "Notification Service must be started");
baBrokerImpl = new DomForwardedBindingBrokerImpl("test");
baBrokerImpl.getMountManager().setDataCommitExecutor(executor);
baBrokerImpl.getMountManager().setNotificationExecutor(executor);
baBrokerImpl.setRpcBroker(new RpcProviderRegistryImpl("test"));
checkState(biDataLegacyBroker != null, "DOM Data Broker needs to be started.");
checkState(mappingServiceImpl != null, "DOM Mapping Service needs to be started.");
checkState(biDataLegacyBroker != null, "DOM Data Broker needs to be started.");
checkState(mappingServiceImpl != null, "DOM Mapping Service needs to be started.");
public void startBindingToDomMappingService() {
checkState(classPool != null, "ClassPool needs to be present");
public void startBindingToDomMappingService() {
checkState(classPool != null, "ClassPool needs to be present");
- mappingServiceImpl = new RuntimeGeneratedMappingServiceImpl();
- mappingServiceImpl.setPool(classPool);
- mappingServiceImpl.init();
+ mappingServiceImpl = new RuntimeGeneratedMappingServiceImpl(classPool);
+ public void startNewBindingDataBroker() {
+ ForwardedBackwardsCompatibleDataBroker forwarded = new ForwardedBackwardsCompatibleDataBroker(newDOMDataBroker, mappingServiceImpl, executor);
+ schemaListeners.add(forwarded);
+ baData = forwarded;
+ }
+
private void startDomMountPoint() {
biMountImpl = new MountPointManagerImpl();
biMountImpl.setDataBroker(getDomDataBroker());
private void startDomMountPoint() {
biMountImpl = new MountPointManagerImpl();
biMountImpl.setDataBroker(getDomDataBroker());
private void startDomBroker() {
checkState(executor != null);
biBrokerImpl = new BrokerImpl();
private void startDomBroker() {
checkState(executor != null);
biBrokerImpl = new BrokerImpl();