Deprecate old MD-SAL APIs for removal
[controller.git] / opendaylight / md-sal / sal-dom-spi / src / main / java / org / opendaylight / controller / md / sal / dom / spi / ForwardingDOMRpcImplementation.java
1 /*
2  * Copyright (c) 2015 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.md.sal.dom.spi;
9
10 import com.google.common.collect.ForwardingObject;
11 import com.google.common.util.concurrent.CheckedFuture;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.opendaylight.controller.md.sal.dom.api.DOMRpcException;
14 import org.opendaylight.controller.md.sal.dom.api.DOMRpcIdentifier;
15 import org.opendaylight.controller.md.sal.dom.api.DOMRpcImplementation;
16 import org.opendaylight.controller.md.sal.dom.api.DOMRpcResult;
17 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
18
19 /**
20  * Utility implementation which implements {@link DOMRpcImplementation} by forwarding it to
21  * a backing delegate.
22  *
23  * @deprecated Use {@link org.opendaylight.mdsal.dom.spi.ForwardingDOMRpcImplementation} instead.
24  */
25 @Deprecated(forRemoval = true)
26 public abstract class ForwardingDOMRpcImplementation extends ForwardingObject implements DOMRpcImplementation {
27     @Override
28     protected abstract @NonNull DOMRpcImplementation delegate();
29
30     @Override
31     public CheckedFuture<DOMRpcResult, DOMRpcException> invokeRpc(final DOMRpcIdentifier type,
32             final NormalizedNode<?, ?> input) {
33         return delegate().invokeRpc(type, input);
34     }
35 }