Migrate to MD-SAL APIs
[lispflowmapping.git] / mappingservice / neutron / src / main / java / org / opendaylight / lispflowmapping / neutron / SubnetListener.java
1 /*
2  * Copyright (c) 2016 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.lispflowmapping.neutron;
9
10 import org.opendaylight.mdsal.binding.api.DataBroker;
11 import org.opendaylight.mdsal.binding.api.DataTreeIdentifier;
12 import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
13 import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.rev150712.Neutron;
14 import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.subnets.rev150712.subnets.attributes.Subnets;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.subnets.rev150712.subnets.attributes.subnets.Subnet;
16 import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
17
18 /**
19  * Implementation of a ClusteredDataTreeChangeListener that listens for northbound requests on a {@link Subnet} subtree.
20  */
21 public class SubnetListener extends DelegatingDataTreeListener<Subnet> {
22
23     private static final DataTreeIdentifier<Subnet> IDENTIFIER =
24             DataTreeIdentifier.create(LogicalDatastoreType.CONFIGURATION,
25                     InstanceIdentifier.create(Neutron.class).child(Subnets.class).child(Subnet.class));
26
27     public SubnetListener(DataProcessor<Subnet> dataProcessor, DataBroker dataBroker) {
28         super(dataProcessor, dataBroker, IDENTIFIER);
29     }
30
31     @Override
32     public String toString() {
33         return "SubnetListener";
34     }
35 }