import javax.inject.Inject;
import javax.inject.Singleton;
import org.opendaylight.mdsal.binding.api.NotificationService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketReceived;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.topology.lldp.discovery.config.rev160511.TopologyLldpDiscoveryConfig;
-import org.opendaylight.yangtools.concepts.ListenerRegistration;
-import org.opendaylight.yangtools.yang.binding.NotificationListener;
+import org.opendaylight.yangtools.concepts.Registration;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
private static String lldpSecureKey;
- private final ListenerRegistration<NotificationListener> lldpNotificationRegistration;
+ private final Registration lldpNotificationRegistration;
@SuppressFBWarnings("ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD")
@Inject
LOG.info("Starting LLDPActivator with lldpSecureKey: {}", lldpSecureKey);
- lldpNotificationRegistration = notificationService.registerNotificationListener(lldpDiscoveryListener);
+ lldpNotificationRegistration =
+ notificationService.registerListener(PacketReceived.class, lldpDiscoveryListener);
LOG.info("LLDPDiscoveryListener started.");
}