Search in sources :

Example 1 with IdIntsListener

use of org.opendaylight.controller.clustering.it.provider.impl.IdIntsListener in project controller by opendaylight.

the class MdsalLowLevelTestProvider method subscribeDtcl.

@Override
public Future<RpcResult<Void>> subscribeDtcl() {
    if (dtclReg != null) {
        final RpcError error = RpcResultBuilder.newError(ErrorType.RPC, "Registration present.", "There is already dataTreeChangeListener registered on id-ints list.");
        return Futures.immediateFuture(RpcResultBuilder.<Void>failed().withRpcError(error).build());
    }
    idIntsListener = new IdIntsListener();
    dtclReg = domDataTreeChangeService.registerDataTreeChangeListener(new org.opendaylight.controller.md.sal.dom.api.DOMDataTreeIdentifier(CONTROLLER_CONFIG, WriteTransactionsHandler.ID_INT_YID), idIntsListener);
    return Futures.immediateFuture(RpcResultBuilder.<Void>success().build());
}
Also used : IdIntsListener(org.opendaylight.controller.clustering.it.provider.impl.IdIntsListener) DOMDataTreeIdentifier(org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier) RpcError(org.opendaylight.yangtools.yang.common.RpcError)

Aggregations

IdIntsListener (org.opendaylight.controller.clustering.it.provider.impl.IdIntsListener)1 DOMDataTreeIdentifier (org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier)1 RpcError (org.opendaylight.yangtools.yang.common.RpcError)1