@Override public boolean isClosed() { return isLastFrameQueued || isTerminated(); }
private void writeEmptyFin() { if (!isTerminated()) { unflushedWritesCounter.incrementAndGet(); flushToConnectionOutputSink(null, Buffers.EMPTY_BUFFER, new FlushCompletionHandler(null), null, true); } }
private void writeEmptyFin() { if (!isTerminated()) { unflushedWritesCounter.incrementAndGet(); flushToConnectionOutputSink(null, Buffers.EMPTY_BUFFER, new FlushCompletionHandler(null), null, true); } }
private void writeEmptyFin() { if (!isTerminated()) { unflushedWritesCounter.incrementAndGet(); flushToConnectionOutputSink(null, Buffers.EMPTY_BUFFER, new FlushCompletionHandler(null), null, true); } }
private void assertReady() throws IOException { // if the last frame (fin flag == 1) has been queued already - throw an IOException if (isTerminated()) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Terminated!!! id={0} description={1}", new Object[]{stream.getId(), terminationFlag.getDescription()}); } throw new IOException(terminationFlag.getDescription()); } else if (isLastFrameQueued) { throw new IOException("Write beyond end of stream"); } }
private void writeEmptyFin() { if (!isTerminated()) { unflushedWritesCounter.incrementAndGet(); flushToConnectionOutputSink(null, Buffers.EMPTY_BUFFER, new FlushCompletionHandler(null), null, true); } }
private void assertReady() throws IOException { // if the last frame (fin flag == 1) has been queued already - throw an IOException if (isTerminated()) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Terminated!!! id={0} description={1}", new Object[]{stream.getId(), terminationFlag.getDescription()}); } throw new IOException(terminationFlag.getDescription()); } else if (isLastFrameQueued) { throw new IOException("Write beyond end of stream"); } }
private void writeEmptyFin() { if (!isTerminated()) { unflushedWritesCounter.incrementAndGet(); flushToConnectionOutputSink(null, Buffers.EMPTY_BUFFER, new FlushCompletionHandler(null), null, true); } }
private void writeEmptyFin() { if (!isTerminated()) { unflushedWritesCounter.incrementAndGet(); flushToConnectionOutputSink(null, Buffers.EMPTY_BUFFER, new FlushCompletionHandler(null), null, true); } }
private void assertReady() throws IOException { // if the last frame (fin flag == 1) has been queued already - throw an IOException if (isTerminated()) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Terminated!!! id={0} description={1}", new Object[]{stream.getId(), terminationFlag.getDescription()}); } throw new IOException(terminationFlag.getDescription()); } else if (isLastFrameQueued) { throw new IOException("Write beyond end of stream"); } }
private void assertReady() throws IOException { // if the last frame (fin flag == 1) has been queued already - throw an IOException if (isTerminated()) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Terminated!!! id={0} description={1}", new Object[]{stream.getId(), terminationFlag.getDescription()}); } throw new IOException(terminationFlag.getDescription()); } else if (isLastFrameQueued) { throw new IOException("Write beyond end of stream"); } }
private void assertReady() throws IOException { // if the last frame (fin flag == 1) has been queued already - throw an IOException if (isTerminated()) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Terminated!!! id={0} description={1}", new Object[]{stream.getId(), terminationFlag.getDescription()}); } throw new IOException(terminationFlag.getDescription()); } else if (isLastFrameQueued) { throw new IOException("Write beyond end of stream"); } }
private void assertReady() throws IOException { // if the last frame (fin flag == 1) has been queued already - throw an IOException if (isTerminated()) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Terminated!!! id={0} description={1}", new Object[]{stream.getId(), terminationFlag.getDescription()}); } throw new IOException(terminationFlag.getDescription()); } else if (isLastFrameQueued) { throw new IOException("Write beyond end of stream"); } }
private void assertReady() throws IOException { // if the last frame (fin flag == 1) has been queued already - throw an IOException if (isTerminated()) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Terminated!!! id={0} description={1}", new Object[]{stream.getId(), terminationFlag.getDescription()}); } throw new IOException(terminationFlag.getDescription()); } else if (isLastFrameQueued) { throw new IOException("Write beyond end of stream"); } }
private void assertReady() throws IOException { // if the last frame (fin flag == 1) has been queued already - throw an IOException if (isTerminated()) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Terminated!!! id={0} description={1}", new Object[]{stream.getId(), terminationFlag.getDescription()}); } throw new IOException(terminationFlag.getDescription()); } else if (isLastFrameQueued) { throw new IOException("Write beyond end of stream"); } }
private void assertReady() throws IOException { // if the last frame (fin flag == 1) has been queued already - throw an IOException if (isTerminated()) { if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, "Terminated!!! id={0} description={1}", new Object[]{stream.getId(), terminationFlag.getDescription()}); } throw new IOException(terminationFlag.getDescription()); } else if (isLastFrameQueued) { throw new IOException("Write beyond end of stream"); } }
private void writeEmptyFin() { if (!isTerminated()) { unflushedWritesCounter.incrementAndGet(); flushToConnectionOutputSink(null, Buffers.EMPTY_BUFFER, new FlushCompletionHandler(null), null, true); } }
private void writeEmptyFin() { if (!isTerminated()) { unflushedWritesCounter.incrementAndGet(); flushToConnectionOutputSink(null, Buffers.EMPTY_BUFFER, new FlushCompletionHandler(null), null, true); } }
private void writeEmptyFin() { if (!isTerminated()) { unflushedWritesCounter.incrementAndGet(); flushToConnectionOutputSink(null, Buffers.EMPTY_BUFFER, new FlushCompletionHandler(null), null, true); } }
/** * Unlike {@link #close()} this method forces the output sink termination * by setting termination flag and canceling all the pending writes. */ @Override public synchronized void terminate(final Termination terminationFlag) { if (!isTerminated()) { this.terminationFlag = terminationFlag; outputQueue.onClose(); // NOTIFY STREAM stream.onOutputClosed(); } }