diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2016-09-05 10:47:45 +0200 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2016-09-05 08:58:56 +0000 |
commit | f5974daaf5d094b9890145b386adc8313c705ea1 (patch) | |
tree | f80a4464c818eee07dc6857e31cc9ac1059875b9 | |
parent | 2645ef7b9214bff46fcfc8933fed9d571bc6abe5 (diff) |
Fix ReaderFactory: remove AutoClosable from list
of implemented interfaces.
Reader factories do not need to be AutoClosable.
Change-Id: I779e87eb0b03750e264df52e14eee58467ca799a
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
6 files changed, 10 insertions, 13 deletions
diff --git a/infra/impl/src/main/java/io/fd/honeycomb/impl/NetconfMonitoringReaderFactory.java b/infra/impl/src/main/java/io/fd/honeycomb/impl/NetconfMonitoringReaderFactory.java index a299dbe3f..244ae585e 100644 --- a/infra/impl/src/main/java/io/fd/honeycomb/impl/NetconfMonitoringReaderFactory.java +++ b/infra/impl/src/main/java/io/fd/honeycomb/impl/NetconfMonitoringReaderFactory.java @@ -15,6 +15,7 @@ */ package io.fd.honeycomb.impl; +import io.fd.honeycomb.translate.read.ReaderFactory; import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder; import io.fd.honeycomb.translate.util.read.BindingBrokerReader; import org.opendaylight.controller.md.sal.binding.api.DataBroker; @@ -24,10 +25,10 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.netconf.mon import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; /** - * {@link io.fd.honeycomb.translate.read.ReaderFactory} initiating reader into NETCONF's dedicated data store. + * {@link ReaderFactory} initiating reader into NETCONF's dedicated data store. * Making NETCONF operational data available over NETCONF/RESTCONF */ -public final class NetconfMonitoringReaderFactory implements AutoCloseable, io.fd.honeycomb.translate.read.ReaderFactory { +public final class NetconfMonitoringReaderFactory implements ReaderFactory { private final DataBroker netconfMonitoringBindingBrokerDependency; diff --git a/infra/translate-api/src/main/java/io/fd/honeycomb/translate/read/ReaderFactory.java b/infra/translate-api/src/main/java/io/fd/honeycomb/translate/read/ReaderFactory.java index 701a26dd5..658e2460f 100644 --- a/infra/translate-api/src/main/java/io/fd/honeycomb/translate/read/ReaderFactory.java +++ b/infra/translate-api/src/main/java/io/fd/honeycomb/translate/read/ReaderFactory.java @@ -24,15 +24,10 @@ import javax.annotation.Nonnull; * Factory producing readers for {@link ModifiableReaderRegistryBuilder}. */ @Beta -public interface ReaderFactory extends AutoCloseable { +public interface ReaderFactory { /** * Initialize 1 or more readers and add them to provided registry. */ void init(@Nonnull ModifiableReaderRegistryBuilder registry); - - @Override - default void close() { - // NOOP TODO allow unregister - } } diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesStateReaderFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesStateReaderFactory.java index bec40c9a5..163457b2e 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesStateReaderFactory.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/InterfacesStateReaderFactory.java @@ -64,7 +64,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.v3po.rev import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.openvpp.jvpp.core.future.FutureJVppCore; -public final class InterfacesStateReaderFactory implements ReaderFactory, AutoCloseable { +public final class InterfacesStateReaderFactory implements ReaderFactory { private NamingContext ifcCtx; private NamingContext bdCtx; diff --git a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppClassifierReaderFactory.java b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppClassifierReaderFactory.java index 00d0efcf6..90fbb87ba 100644 --- a/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppClassifierReaderFactory.java +++ b/v3po/v3po2vpp/src/main/java/io/fd/honeycomb/translate/v3po/VppClassifierReaderFactory.java @@ -32,7 +32,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.clas import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; import org.openvpp.jvpp.core.future.FutureJVppCore; -public final class VppClassifierReaderFactory implements ReaderFactory, AutoCloseable { +public final class VppClassifierReaderFactory implements ReaderFactory { private final FutureJVppCore jvpp; private final NamingContext classifyCtx; 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 83befb71a..ea6b2e460 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 @@ -43,7 +43,7 @@ import org.openvpp.jvpp.core.future.FutureJVppCore; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -public final class VppStateHoneycombReaderFactory implements ReaderFactory, AutoCloseable { +public final class VppStateHoneycombReaderFactory implements ReaderFactory { private static final Logger LOG = LoggerFactory.getLogger(VppStateHoneycombReaderFactory.class); diff --git a/vpp-common/naming-context-impl/src/main/java/io/fd/honeycomb/vpp/context/ContextsReaderFactory.java b/vpp-common/naming-context-impl/src/main/java/io/fd/honeycomb/vpp/context/ContextsReaderFactory.java index 6d3a3f13b..0745475f7 100644 --- a/vpp-common/naming-context-impl/src/main/java/io/fd/honeycomb/vpp/context/ContextsReaderFactory.java +++ b/vpp-common/naming-context-impl/src/main/java/io/fd/honeycomb/vpp/context/ContextsReaderFactory.java @@ -15,6 +15,7 @@ */ package io.fd.honeycomb.vpp.context; +import io.fd.honeycomb.translate.read.ReaderFactory; import io.fd.honeycomb.translate.read.registry.ModifiableReaderRegistryBuilder; import io.fd.honeycomb.translate.util.read.BindingBrokerReader; import org.opendaylight.controller.md.sal.binding.api.DataBroker; @@ -24,10 +25,10 @@ import org.opendaylight.yang.gen.v1.urn.honeycomb.params.xml.ns.yang.naming.cont import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; /** - * {@link io.fd.honeycomb.translate.read.ReaderFactory} initiating reader providing data from context data store. + * {@link ReaderFactory} initiating reader providing data from context data store. * Making them available over RESTCONF/NETCONF. */ -public final class ContextsReaderFactory implements AutoCloseable, io.fd.honeycomb.translate.read.ReaderFactory { +public final class ContextsReaderFactory implements ReaderFactory { private final DataBroker contextBindingBrokerDependency; |