@Override @LifecycleStop public void close() throws IOException { emitter.close(); }
private void closeNoFlush(Emitter emitter) throws IOException { emitter.close(); }
@Override @LifecycleStop public void close() throws IOException { boolean fail = false; log.info("Closing Composing Emitter."); for (Emitter e : emitters) { try { log.info("Closing emitter %s.", e.getClass().getName()); e.close(); } catch (IOException ex) { log.error(ex, "Failed to close emitter [%s]", e.getClass().getName()); fail = true; } } if (fail) { throw new IOException("failed to close one or more emitters"); } }
@Test public void testClose() throws IOException { for (Emitter emitter : childEmitters) { emitter.close(); EasyMock.replay(emitter); } composingEmitter.close(); }
private void closeAndExpectFlush(Emitter emitter) throws IOException { httpClient.setGoHandler(GoHandlers.passingHandler(okResponse()).times(1)); emitter.close(); }
@Override @LifecycleStop public void close() throws IOException { emitter.close(); }
@Override @LifecycleStop public void close() throws IOException { boolean fail = false; log.info("Closing Composing Emitter."); for (Emitter e : emitters) { try { log.info("Closing emitter %s.", e.getClass().getName()); e.close(); } catch (IOException ex) { log.error(ex, "Failed to close emitter [%s]", e.getClass().getName()); fail = true; } } if (fail) { throw new IOException("failed to close one or more emitters"); } }