2 * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.md.sal.binding.api;
10 import com.google.common.collect.ForwardingObject;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.controller.md.sal.common.api.data.TransactionChainListener;
13 import org.opendaylight.yangtools.concepts.ListenerRegistration;
14 import org.opendaylight.yangtools.yang.binding.DataObject;
17 * Utility {@link DataBroker} implementation which forwards all interface method
18 * invocation to a delegate instance.
20 * @deprecated Use org.opendaylight.mdsal.binding.spi.ForwardingDataBroker instead.
22 @Deprecated(forRemoval = true)
23 public abstract class ForwardingDataBroker extends ForwardingObject implements DataBroker {
26 protected abstract @NonNull DataBroker delegate();
29 public ReadOnlyTransaction newReadOnlyTransaction() {
30 return delegate().newReadOnlyTransaction();
34 public ReadWriteTransaction newReadWriteTransaction() {
35 return delegate().newReadWriteTransaction();
39 public WriteTransaction newWriteOnlyTransaction() {
40 return delegate().newWriteOnlyTransaction();
44 public <T extends DataObject, L extends DataTreeChangeListener<T>> ListenerRegistration<L>
45 registerDataTreeChangeListener(DataTreeIdentifier<T> treeId, L listener) {
46 return delegate().registerDataTreeChangeListener(treeId, listener);
50 public BindingTransactionChain createTransactionChain(TransactionChainListener listener) {
51 return delegate().createTransactionChain(listener);