diff options
Diffstat (limited to 'v3po/translate-api/src/main/java')
-rw-r--r-- | v3po/translate-api/src/main/java/io/fd/honeycomb/v3po/translate/read/ReaderFactory.java | 7 | ||||
-rw-r--r-- | v3po/translate-api/src/main/java/io/fd/honeycomb/v3po/translate/write/WriterFactory.java | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/v3po/translate-api/src/main/java/io/fd/honeycomb/v3po/translate/read/ReaderFactory.java b/v3po/translate-api/src/main/java/io/fd/honeycomb/v3po/translate/read/ReaderFactory.java index 6d6d52acc..61472f8d2 100644 --- a/v3po/translate-api/src/main/java/io/fd/honeycomb/v3po/translate/read/ReaderFactory.java +++ b/v3po/translate-api/src/main/java/io/fd/honeycomb/v3po/translate/read/ReaderFactory.java @@ -24,10 +24,15 @@ import javax.annotation.Nonnull; * Factory producing readers for {@link ModifiableReaderRegistryBuilder}. */ @Beta -public interface ReaderFactory { +public interface ReaderFactory extends AutoCloseable { /** * 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/translate-api/src/main/java/io/fd/honeycomb/v3po/translate/write/WriterFactory.java b/v3po/translate-api/src/main/java/io/fd/honeycomb/v3po/translate/write/WriterFactory.java index dfcffa47f..ffc76a0e4 100644 --- a/v3po/translate-api/src/main/java/io/fd/honeycomb/v3po/translate/write/WriterFactory.java +++ b/v3po/translate-api/src/main/java/io/fd/honeycomb/v3po/translate/write/WriterFactory.java @@ -24,10 +24,15 @@ import javax.annotation.Nonnull; * Factory producing writers for {@link ModifiableWriterRegistryBuilder}. */ @Beta -public interface WriterFactory { +public interface WriterFactory extends AutoCloseable { /** * Initialize 1 or more writers and add them to provided registry. */ void init(@Nonnull ModifiableWriterRegistryBuilder registry); + + @Override + default void close() { + // NOOP TODO allow unregister + } } |