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 / ForwardingDOMNotificationService.java
1 /*
2  * Copyright (c) 2014 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 java.util.Collection;
12 import org.opendaylight.controller.md.sal.dom.api.DOMNotificationListener;
13 import org.opendaylight.controller.md.sal.dom.api.DOMNotificationService;
14 import org.opendaylight.yangtools.concepts.ListenerRegistration;
15 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
16
17 /**
18  * Utility implementation of a {@link DOMNotificationService} which forwards all requests
19  * to a delegate instance.
20  *
21  * @deprecated Use {@link org.opendaylight.mdsal.dom.spi.ForwardingDOMNotificationService} instead.
22  */
23 @Deprecated(forRemoval = true)
24 public abstract class ForwardingDOMNotificationService extends ForwardingObject implements DOMNotificationService {
25     @Override
26     protected abstract DOMNotificationService delegate();
27
28     @Override
29     public <T extends DOMNotificationListener> ListenerRegistration<T> registerNotificationListener(final T listener,
30             final Collection<SchemaPath> types) {
31         return delegate().registerNotificationListener(listener, types);
32     }
33
34     @Override
35     public <T extends DOMNotificationListener> ListenerRegistration<T> registerNotificationListener(final T listener,
36             final SchemaPath... types) {
37         return delegate().registerNotificationListener(listener, types);
38     }
39 }