X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=networkmodel%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Ftransportpce%2Fnetworkmodel%2Flisteners%2FTcaListener710.java;h=14ec27289d64a3bcea072d2458567472e4a906db;hb=d03abd5d1287ce81ae3c6c4ff58fe255c77fc427;hp=220e23b7b558dd9c4b5a1c9fdc7c821ba8c53f62;hpb=f26a8d33de6039fc678a8f053eaf1f49de3a9718;p=transportpce.git diff --git a/networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/listeners/TcaListener710.java b/networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/listeners/TcaListener710.java index 220e23b7b..14ec27289 100644 --- a/networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/listeners/TcaListener710.java +++ b/networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/listeners/TcaListener710.java @@ -8,21 +8,26 @@ package org.opendaylight.transportpce.networkmodel.listeners; -import org.opendaylight.yang.gen.v1.http.org.openroadm.tca.rev200327.OrgOpenroadmTcaListener; +import java.util.Set; +import org.opendaylight.mdsal.binding.api.NotificationService.CompositeListener; import org.opendaylight.yang.gen.v1.http.org.openroadm.tca.rev200327.TcaNotification; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public class TcaListener710 implements OrgOpenroadmTcaListener { +public class TcaListener710 { private static final Logger LOG = LoggerFactory.getLogger(TcaListener710.class); + public CompositeListener getCompositeListener() { + return new CompositeListener(Set.of( + new CompositeListener.Component<>(TcaNotification.class, this::onTcaNotification))); + } + /** * Callback for tca-notification. * @param notification TcaNotification object */ - @Override - public void onTcaNotification(TcaNotification notification) { + private void onTcaNotification(TcaNotification notification) { LOG.info("Notification {} received {}", TcaNotification.QNAME, notification); }