Class TestableDataBroker
- java.lang.Object
-
- org.opendaylight.genius.datastoreutils.testutils.TestableDataBroker
-
- All Implemented Interfaces:
org.opendaylight.controller.md.sal.binding.api.BindingService,org.opendaylight.controller.md.sal.binding.api.DataBroker,org.opendaylight.controller.md.sal.binding.api.DataTreeChangeService,org.opendaylight.controller.md.sal.binding.api.TransactionFactory,org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker<org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?>,org.opendaylight.yangtools.yang.binding.DataObject>,org.opendaylight.controller.md.sal.common.api.data.AsyncDataTransactionFactory<org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?>,org.opendaylight.yangtools.yang.binding.DataObject>,org.opendaylight.controller.md.sal.common.api.data.TransactionChainFactory<org.opendaylight.yangtools.yang.binding.InstanceIdentifier<?>,org.opendaylight.yangtools.yang.binding.DataObject>,org.opendaylight.controller.sal.binding.api.BindingAwareService
public abstract class TestableDataBroker extends java.lang.Object implements org.opendaylight.controller.md.sal.binding.api.DataBrokerDataBrokeruseful in tests of utilities.- Author:
- Michael Vorburger.ch
-
-
Constructor Summary
Constructors Constructor Description TestableDataBroker()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidasyncFireDataTreeChangeListener()RunfireDataTreeChangeListener()in an asynchronous background thread.voidfireDataTreeChangeListener()static TestableDataBrokernewInstance()<T extends org.opendaylight.yangtools.yang.binding.DataObject,L extends org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener<T>>
org.opendaylight.yangtools.concepts.ListenerRegistration<L>registerDataTreeChangeListener(org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier<T> id, L newListener)
-
-
-
Method Detail
-
newInstance
public static TestableDataBroker newInstance()
-
registerDataTreeChangeListener
public <T extends org.opendaylight.yangtools.yang.binding.DataObject,L extends org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener<T>> org.opendaylight.yangtools.concepts.ListenerRegistration<L> registerDataTreeChangeListener(org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier<T> id, L newListener)- Specified by:
registerDataTreeChangeListenerin interfaceorg.opendaylight.controller.md.sal.binding.api.DataTreeChangeService
-
fireDataTreeChangeListener
public void fireDataTreeChangeListener()
-
asyncFireDataTreeChangeListener
public void asyncFireDataTreeChangeListener()
RunfireDataTreeChangeListener()in an asynchronous background thread. Exceptions thrown will be logged as errors; tests using this are therefore strongly encouraged to use the org.opendaylight.infrautils.testutils.LogCaptureRule so that tests fail if there were exceptions in the listener.
-
-