BUG-8733: refactor IdInts listeners
[controller.git] / opendaylight / md-sal / samples / clustering-test-app / provider / src / main / java / org / opendaylight / controller / clustering / it / provider / impl / IdIntsDOMDataTreeLIstener.java
1 /*
2  * Copyright (c) 2017 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
9 package org.opendaylight.controller.clustering.it.provider.impl;
10
11 import java.util.Collection;
12 import java.util.Map;
13 import javax.annotation.Nonnull;
14 import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier;
15 import org.opendaylight.mdsal.dom.api.DOMDataTreeListener;
16 import org.opendaylight.mdsal.dom.api.DOMDataTreeListeningException;
17 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
18 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate;
19
20 public class IdIntsDOMDataTreeLIstener extends AbstractDataListener implements DOMDataTreeListener {
21      @Override
22     public void onDataTreeChanged(@Nonnull final Collection<DataTreeCandidate> changes,
23                                   @Nonnull final Map<DOMDataTreeIdentifier, NormalizedNode<?, ?>> subtrees) {
24         onReceivedChanges(changes);
25     }
26
27     @Override
28     public void onDataTreeFailed(@Nonnull final Collection<DOMDataTreeListeningException> causes) {
29         onReceivedError(causes);
30     }
31 }