Bump upstream dependencies to Ca
[transportpce.git] / networkmodel / src / main / java / org / opendaylight / transportpce / networkmodel / listeners / LldpListener.java
1 /*
2  * Copyright © 2017 AT&T 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.transportpce.networkmodel.listeners;
10
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.mdsal.binding.api.NotificationService.Listener;
13 import org.opendaylight.yang.gen.v1.http.org.openroadm.lldp.rev161014.LldpNbrInfoChange;
14 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
15 import org.slf4j.Logger;
16 import org.slf4j.LoggerFactory;
17
18 public class LldpListener implements Listener<LldpNbrInfoChange> {
19
20     private static final Logger LOG = LoggerFactory.getLogger(LldpListener.class);
21     private final NodeId nodeId;
22
23     public LldpListener(final String nodeId) {
24         this.nodeId = new NodeId(nodeId);
25     }
26
27     /**
28      * Callback for lldp-nbr-info-change.
29      * @param notification LldpNbrInfoChange object
30      */
31     @Override
32     public void onNotification(@NonNull LldpNbrInfoChange notification) {
33         LOG.info("Notification {} received {} on node {}", LldpNbrInfoChange.QNAME, notification, nodeId);
34     }
35 }