@Test @DisplayName("not allow closing twice") void notAllowClosingTwice() throws Exception { FilterChain<EventEnvelope> chain = new FilterChain<>(ImmutableList.of()); chain.close(); assertThrows(IllegalStateException.class, chain::close); }
@Override public void close() throws Exception { checkOpen(); closed = true; for (BusFilter<?> filter : chain.reverse()) { filter.close(); } }
FilterChain implements BusFilter<E>, Closeable { @Override public void close() throws Exception { checkOpen(); closed = true; for (BusFilter<?> filter : chain.reverse()) { filter.close(); } } }
FilterChain implements BusFilter<E>, Closeable { @Override public void close() throws Exception { checkOpen(); closed = true; for (BusFilter<?> filter : chain.reverse()) { filter.close(); } } FilterChain(Iterable<BusFilter<E>> filters); }
FilterChain implements BusFilter<E>, Closeable { @Override public void close() throws Exception { checkOpen(); closed = true; for (BusFilter<?> filter : chain.reverse()) { filter.close(); } } FilterChain(Iterable<BusFilter<E>> filters); @Override Optional<Ack> filter(E envelope); @Override void close(); @Override boolean isOpen(); @Override String toString(); }
FilterChain implements BusFilter<E>, Closeable { @Override public void close() throws Exception { checkOpen(); closed = true; for (BusFilter<?> filter : chain.reverse()) { filter.close(); } } FilterChain(Iterable<BusFilter<E>> filters); @Override Optional<Ack> filter(E envelope); @Override void close(); @Override boolean isOpen(); @Override String toString();  }