package org.opendaylight.transportpce.networkmodel.listeners;
+import org.eclipse.jdt.annotation.NonNull;
+import org.opendaylight.mdsal.binding.api.NotificationService.Listener;
import org.opendaylight.transportpce.networkmodel.R2RLinkDiscovery;
import org.opendaylight.yang.gen.v1.http.org.openroadm.lldp.rev181019.LldpNbrInfoChange;
-import org.opendaylight.yang.gen.v1.http.org.openroadm.lldp.rev181019.OrgOpenroadmLldpListener;
import org.opendaylight.yang.gen.v1.http.org.openroadm.resource.types.rev181019.ResourceNotificationType;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.network.rev180226.NodeId;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class LldpListener221 implements OrgOpenroadmLldpListener {
+public class LldpListener221 implements Listener<LldpNbrInfoChange> {
private static final Logger LOG = LoggerFactory.getLogger(LldpListener221.class);
private final R2RLinkDiscovery linkDiscovery;
* @param notification LldpNbrInfoChange object
*/
@Override
- public void onLldpNbrInfoChange(LldpNbrInfoChange notification) {
+ public void onNotification(@NonNull LldpNbrInfoChange notification) {
LOG.info("Notification {} received {}", LldpNbrInfoChange.QNAME, notification);
if (notification.getNotificationType().equals(ResourceNotificationType.ResourceCreation)) {
linkDiscovery.createR2RLink(nodeId,notification.getResource(),