Class TestableDataBroker
- java.lang.Object
-
- org.opendaylight.genius.datastoreutils.testutils.TestableDataBroker
-
- All Implemented Interfaces:
org.opendaylight.mdsal.binding.api.BindingService,org.opendaylight.mdsal.binding.api.DataBroker,org.opendaylight.mdsal.binding.api.DataTreeChangeService,org.opendaylight.mdsal.binding.api.TransactionFactory
public abstract class TestableDataBroker extends java.lang.Object implements org.opendaylight.mdsal.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.mdsal.binding.api.DataTreeChangeListener<T>>
org.opendaylight.yangtools.concepts.ListenerRegistration<L>registerDataTreeChangeListener(org.opendaylight.mdsal.binding.api.DataTreeIdentifier<T> id, L newListener)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
newInstance
public static TestableDataBroker newInstance()
-
registerDataTreeChangeListener
public <T extends org.opendaylight.yangtools.yang.binding.DataObject,L extends org.opendaylight.mdsal.binding.api.DataTreeChangeListener<T>> org.opendaylight.yangtools.concepts.ListenerRegistration<L> registerDataTreeChangeListener(org.opendaylight.mdsal.binding.api.DataTreeIdentifier<T> id, L newListener)- Specified by:
registerDataTreeChangeListenerin interfaceorg.opendaylight.mdsal.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.
-
-