diff options
Diffstat (limited to 'v3po/v3po2vpp/src/main/java')
-rw-r--r-- | v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppStateHoneycombReaderFactory.java | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppStateHoneycombReaderFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppStateHoneycombReaderFactory.java index ea6b2e460..b379c81d2 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppStateHoneycombReaderFactory.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppStateHoneycombReaderFactory.java @@ -25,6 +25,7 @@ import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder; import io.fd.honeycomb.translate.util.read.KeepaliveReaderWrapper; import io.fd.honeycomb.translate.v3po.util.NamingContext; import io.fd.honeycomb.translate.v3po.util.ReadTimeoutException; +import io.fd.honeycomb.translate.v3po.util.VppStatusListener; import io.fd.honeycomb.translate.v3po.vppstate.BridgeDomainCustomizer; import io.fd.honeycomb.translate.v3po.vppstate.L2FibEntryCustomizer; import io.fd.honeycomb.translate.v3po.vppstate.VersionCustomizer; @@ -40,27 +41,26 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev150105.vpp.state.bridge.domains.BridgeDomain; import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.openvpp.jvpp.core.future.FutureJVppCore; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public final class VppStateHoneycombReaderFactory implements ReaderFactory { - private static final Logger LOG = LoggerFactory.getLogger(VppStateHoneycombReaderFactory.class); - private final FutureJVppCore jVpp; private final NamingContext ifcCtx; private final NamingContext bdCtx; private final ScheduledExecutorService keepaliveExecutor; + private final VppStatusListener vppStatusListener; @Inject public VppStateHoneycombReaderFactory(final FutureJVppCore jVpp, @Named("interface-context") final NamingContext ifcCtx, @Named("bridge-domain-context") final NamingContext bdCtx, - final ScheduledExecutorService keepaliveExecutorDependency) { + final ScheduledExecutorService keepaliveExecutorDependency, + final VppStatusListener vppStatusListener) { this.jVpp = jVpp; this.ifcCtx = ifcCtx; this.bdCtx = bdCtx; this.keepaliveExecutor = keepaliveExecutorDependency; + this.vppStatusListener = vppStatusListener; } @Override @@ -75,9 +75,7 @@ public final class VppStateHoneycombReaderFactory implements ReaderFactory { // is truly generic registry.add(new KeepaliveReaderWrapper<>( new GenericReader<>(vppStateId.child(Version.class), new VersionCustomizer(jVpp)), - keepaliveExecutor, ReadTimeoutException.class, 30, - // FIXME-minimal trigger jvpp reinitialization here - () -> LOG.error("Keepalive failed. VPP is probably DOWN!"))); + keepaliveExecutor, ReadTimeoutException.class, 30, vppStatusListener)); // BridgeDomains(Structural) final InstanceIdentifier<BridgeDomains> bridgeDomainsId = vppStateId.child(BridgeDomains.class); registry.addStructuralReader(bridgeDomainsId, BridgeDomainsBuilder.class); |