@Override public void requestOutput() { channel.requestOutput(); }
@Override public void requestOutput() { channel.requestOutput(); }
@Override public void requestOutput() { channel.requestOutput(); }
private void signalReadiness() { final DataStreamChannel channel = requestChannel.get(); if (channel == null) { throw new IllegalStateException("Output channel is not set"); } channel.requestOutput(); }
private void signalReadiness() { final DataStreamChannel channel = requestChannel.get(); if (channel == null) { throw new IllegalStateException("Output channel is not set"); } channel.requestOutput(); }
private void waitFlush() throws InterruptedIOException { setOutputMode(); if (dataStreamChannel != null) { dataStreamChannel.requestOutput(); } ensureNotAborted(); while (buffer().hasRemaining() || !hasCapacity) { try { condition.await(); } catch (final InterruptedException ex) { Thread.currentThread().interrupt(); throw new InterruptedIOException(ex.getMessage()); } ensureNotAborted(); } setInputMode(); }
@Override public void writeCompleted() throws IOException { if (endStream) { return; } lock.lock(); try { if (!endStream) { endStream = true; if (dataStreamChannel != null) { setOutputMode(); if (buffer().hasRemaining()) { dataStreamChannel.requestOutput(); } else { dataStreamChannel.endStream(); } } } } finally { lock.unlock(); } }
private void waitFlush() throws InterruptedIOException { setOutputMode(); if (dataStreamChannel != null) { dataStreamChannel.requestOutput(); } ensureNotAborted(); while (buffer().hasRemaining() || !hasCapacity) { try { condition.await(); } catch (final InterruptedException ex) { Thread.currentThread().interrupt(); throw new InterruptedIOException(ex.getMessage()); } ensureNotAborted(); } setInputMode(); }
@Override public void writeCompleted() throws IOException { if (endStream) { return; } lock.lock(); try { if (!endStream) { endStream = true; if (dataStreamChannel != null) { setOutputMode(); if (buffer().hasRemaining()) { dataStreamChannel.requestOutput(); } else { dataStreamChannel.endStream(); } } } } finally { lock.unlock(); } }