public abstract class TestableDataBroker extends Object implements org.opendaylight.controller.md.sal.binding.api.DataBroker
DataBroker
useful in tests of utilities.Constructor and Description |
---|
TestableDataBroker() |
Modifier and Type | Method and Description |
---|---|
void |
asyncFireDataTreeChangeListener()
Run
fireDataTreeChangeListener() in an asynchronous background thread. |
void |
fireDataTreeChangeListener() |
static TestableDataBroker |
newInstance() |
<T extends org.opendaylight.yangtools.yang.binding.DataObject,L extends org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener<T>> |
registerDataTreeChangeListener(org.opendaylight.controller.md.sal.binding.api.DataTreeIdentifier<T> id,
L newListener) |
public static TestableDataBroker newInstance()
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)
registerDataTreeChangeListener
in interface org.opendaylight.controller.md.sal.binding.api.DataTreeChangeService
public void fireDataTreeChangeListener()
public void asyncFireDataTreeChangeListener()
fireDataTreeChangeListener()
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.Copyright © 2019 OpenDaylight. All rights reserved.