@Override protected void consume(DataInfo item, int length) { item.consume(length); }
dataInfo.consume(dataInfo.length()); logger.debug("Consumed {} content bytes, queue size {}", dataInfo.consumed(), dataInfos.size()); dataInfo = null;
@Override public void consume(int delta) { super.consume(delta); clientDataInfo.consume(delta); } };
@Override public void consume(int delta) { super.consume(delta); dataInfo.consume(delta); } };
@Override public void consume(int delta) { super.consume(delta); dataInfo.consume(delta); } };
@Override public void consume(int delta) { super.consume(delta); clientDataInfo.consume(delta); } };
@Override public void consume(int delta) { super.consume(delta); serverDataInfo.consume(delta); } };
/** * <p>Reads and consumes the content bytes of this {@link DataInfo} into the given {@link ByteBuffer}.</p> * * @param output the {@link ByteBuffer} to copy the bytes into * @return the number of bytes copied * @see #consume(int) */ public int consumeInto(ByteBuffer output) { int read = readInto(output); consume(read); return read; }
@Override protected void onContentConsumed(DataInfo dataInfo) { dataInfo.consume(dataInfo.length()); } }
@Override public void consume(int delta) { super.consume(delta); serverDataInfo.consume(delta); } };
@Override public void consume(int delta) { super.consume(delta); serverDataInfo.consume(delta); } };
/** * <p>Reads and consumes the content bytes of this {@link DataInfo} into the given byte array, * starting from index {@code offset} for {@code length} bytes.</p> * * @param bytes the byte array to copy the bytes into * @param offset the offset of the byte array to start copying * @param length the number of bytes to copy * @return the number of bytes copied */ public int consumeInto(byte[] bytes, int offset, int length) { int read = readInto(bytes, offset, length); consume(read); return read; }
@Override public void completed(Void context) { dataInfo.consume(dataInfo.length()); logger.debug("P -> C {} from {} to {}", dataInfo, stream, clientStream); }
@Override public void succeeded() { bufferPool.release(buffer); IStream stream = getStream(); dataInfo.consume(size); flowControlStrategy.updateWindow(StandardSession.this, stream, -size); if (dataInfo.available() > 0) { // We have written a frame out of this DataInfo, but there is more to write. // We need to keep the correct ordering of frames, to avoid that another // DataInfo for the same stream is written before this one is finished. flush(this, flusher.prepend(this)); } else { super.succeeded(); stream.updateCloseState(dataInfo.isClose(), true); if (stream.isClosed()) removeStream(stream); } }