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 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"); } }
/** * Builds {@link HttpContent} based on passed payload {@link Buffer}. * If the payload size is <tt>0</tt> and the input buffer has been terminated - * return {@link HttpBrokenContent}. */ private HttpContent buildHttpContent(final Buffer payload) { final Termination localTermination = closeFlag; final boolean isFin = localTermination == IN_FIN_TERMINATION; final HttpContent httpContent; // if payload size is not 0 or this is FIN payload if (payload.hasRemaining() || localTermination == null || isFin) { final HttpHeader inputHttpHeader = stream.getInputHttpHeader(); inputHttpHeader.setExpectContent(!isFin); httpContent = HttpContent.builder(inputHttpHeader) .content(payload) .last(isFin) .build(); } else { // create broken HttpContent httpContent = buildBrokenHttpContent( new EOFException(localTermination.getDescription())); } return httpContent; }
http2Session.sendMessageUpstream(stream, buildBrokenHttpContent( new EOFException(closeFlag.getDescription())));
http2Session.sendMessageUpstream(stream, buildBrokenHttpContent( new EOFException(closeFlag.getDescription())));
http2Session.sendMessageUpstream(stream, buildBrokenHttpContent( new EOFException(closeFlag.getDescription())));
/** * Builds {@link HttpContent} based on passed payload {@link Buffer}. * If the payload size is <tt>0</tt> and the input buffer has been terminated - * return {@link HttpBrokenContent}. */ private HttpContent buildHttpContent(final Buffer payload) { final Termination localTermination = closeFlag; final boolean isFin = localTermination == IN_FIN_TERMINATION; final HttpContent httpContent; // if payload size is not 0 or this is FIN payload if (payload.hasRemaining() || localTermination == null || isFin) { final HttpHeader inputHttpHeader = stream.getInputHttpHeader(); inputHttpHeader.setExpectContent(!isFin); httpContent = HttpContent.builder(inputHttpHeader) .content(payload) .last(isFin) .build(); } else { // create broken HttpContent httpContent = buildBrokenHttpContent( new EOFException(localTermination.getDescription())); } return httpContent; }
/** * Builds {@link HttpContent} based on passed payload {@link Buffer}. * If the payload size is <tt>0</tt> and the input buffer has been terminated - * return {@link HttpBrokenContent}. */ private HttpContent buildHttpContent(final Buffer payload) { final Termination localTermination = closeFlag; final boolean isFin = localTermination == IN_FIN_TERMINATION; final HttpContent httpContent; // if payload size is not 0 or this is FIN payload if (payload.hasRemaining() || localTermination == null || isFin) { final HttpHeader inputHttpHeader = stream.getInputHttpHeader(); inputHttpHeader.setExpectContent(!isFin); httpContent = HttpContent.builder(inputHttpHeader) .content(payload) .last(isFin) .build(); } else { // create broken HttpContent httpContent = buildBrokenHttpContent( new EOFException(localTermination.getDescription())); } return httpContent; }
/** * Builds {@link HttpContent} based on passed payload {@link Buffer}. * If the payload size is <tt>0</tt> and the input buffer has been terminated - * return {@link HttpBrokenContent}. */ private HttpContent buildHttpContent(final Buffer payload) { final Termination localTermination = closeFlag; final boolean isFin = localTermination == IN_FIN_TERMINATION; final HttpContent httpContent; // if payload size is not 0 or this is FIN payload if (payload.hasRemaining() || localTermination == null || isFin) { final HttpHeader inputHttpHeader = stream.getInputHttpHeader(); inputHttpHeader.setExpectContent(!isFin); httpContent = HttpContent.builder(inputHttpHeader) .content(payload) .last(isFin) .build(); } else { // create broken HttpContent httpContent = buildBrokenHttpContent( new EOFException(localTermination.getDescription())); } return httpContent; }
/** * Builds {@link HttpContent} based on passed payload {@link Buffer}. * If the payload size is <tt>0</tt> and the input buffer has been terminated - * return {@link HttpBrokenContent}. */ private HttpContent buildHttpContent(final Buffer payload) { final Termination localTermination = closeFlag; final boolean isFin = localTermination == IN_FIN_TERMINATION; final HttpContent httpContent; // if payload size is not 0 or this is FIN payload if (payload.hasRemaining() || localTermination == null || isFin) { final HttpHeader inputHttpHeader = stream.getInputHttpHeader(); inputHttpHeader.setExpectContent(!isFin); httpContent = HttpContent.builder(inputHttpHeader) .content(payload) .last(isFin) .build(); } else { // create broken HttpContent httpContent = buildBrokenHttpContent( new EOFException(localTermination.getDescription())); } return httpContent; }
/** * Builds {@link HttpContent} based on passed payload {@link Buffer}. * If the payload size is <tt>0</tt> and the input buffer has been terminated - * return {@link HttpBrokenContent}. */ private HttpContent buildHttpContent(final Buffer payload) { final Termination localTermination = closeFlag; final boolean isFin = localTermination == IN_FIN_TERMINATION; final HttpContent httpContent; // if payload size is not 0 or this is FIN payload if (payload.hasRemaining() || localTermination == null || isFin) { final HttpHeader inputHttpHeader = stream.getInputHttpHeader(); inputHttpHeader.setExpectContent(!isFin); httpContent = HttpContent.builder(inputHttpHeader) .content(payload) .last(isFin) .build(); } else { // create broken HttpContent httpContent = buildBrokenHttpContent( new EOFException(localTermination.getDescription())); } return httpContent; }
/** * Builds {@link HttpContent} based on passed payload {@link Buffer}. * If the payload size is <tt>0</tt> and the input buffer has been terminated - * return {@link HttpBrokenContent}. */ private HttpContent buildHttpContent(final Buffer payload) { final Termination localTermination = closeFlag; final boolean isFin = localTermination == IN_FIN_TERMINATION; final HttpContent httpContent; // if payload size is not 0 or this is FIN payload if (payload.hasRemaining() || localTermination == null || isFin) { final HttpHeader inputHttpHeader = stream.getInputHttpHeader(); inputHttpHeader.setExpectContent(!isFin); httpContent = HttpContent.builder(inputHttpHeader) .content(payload) .last(isFin) .build(); } else { // create broken HttpContent httpContent = buildBrokenHttpContent( new EOFException(localTermination.getDescription())); } return httpContent; }
/** * Builds {@link HttpContent} based on passed payload {@link Buffer}. * If the payload size is <tt>0</tt> and the input buffer has been terminated - * return {@link HttpBrokenContent}. */ private HttpContent buildHttpContent(final Buffer payload) { final Termination localTermination = closeFlag; final boolean isFin = localTermination == IN_FIN_TERMINATION; final HttpContent httpContent; // if payload size is not 0 or this is FIN payload if (payload.hasRemaining() || localTermination == null || isFin) { final HttpHeader inputHttpHeader = stream.getInputHttpHeader(); inputHttpHeader.setExpectContent(!isFin); httpContent = HttpContent.builder(inputHttpHeader) .content(payload) .last(isFin) .build(); } else { // create broken HttpContent httpContent = buildBrokenHttpContent( new EOFException(localTermination.getDescription())); } return httpContent; }