Removed legacy binding-api concepts.
[mdsal.git] / dom / mdsal-dom-spi / src / main / java / org / opendaylight / mdsal / 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.mdsal.dom.spi;
9
10 import org.opendaylight.mdsal.dom.api.DOMNotificationListener;
11 import org.opendaylight.mdsal.dom.api.DOMNotificationService;
12
13 import com.google.common.collect.ForwardingObject;
14 import java.util.Collection;
15 import org.opendaylight.yangtools.concepts.ListenerRegistration;
16 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
17
18 /**
19  * Utility implementation of a {@link DOMNotificationService} which forwards all requests
20  * to a delegate instance.
21  */
22 public abstract class ForwardingDOMNotificationService extends ForwardingObject implements DOMNotificationService {
23     @Override
24     protected abstract DOMNotificationService delegate();
25
26     @Override
27     public <T extends DOMNotificationListener> ListenerRegistration<T> registerNotificationListener(final T listener,
28             final Collection<SchemaPath> types) {
29         return delegate().registerNotificationListener(listener, types);
30     }
31
32     @Override
33     public <T extends DOMNotificationListener> ListenerRegistration<T> registerNotificationListener(final T listener,
34             final SchemaPath... types) {
35         return delegate().registerNotificationListener(listener, types);
36     }
37 }