diff options
author | Maros Marsalek <mmarsale@cisco.com> | 2016-07-14 10:41:49 +0200 |
---|---|---|
committer | Maros Marsalek <mmarsale@cisco.com> | 2016-07-25 10:34:16 +0200 |
commit | f15aed916c69b0766c7bed2dc7fe534f48b97ac9 (patch) | |
tree | 529281c96caf3c5325c17ec89cb3e4a154121091 /v3po/translate-api/src/main/java | |
parent | 4e6b846c342b2c9e9443e3d3472685e5acb32fa3 (diff) |
HONEYCOMB-122: Reader registry integration tests
Add IT test for read infrastructure + some additional unit tests
+ Make Read/Write Factory autoCloseable
Change-Id: I6eab8e6df2c2132af01cea0a9c4b9bece7dc9b74
Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
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 + } } |