@UnstableApi public interface StreamByteDistributor
Modifier and Type | Interface and Description |
---|---|
static interface |
StreamByteDistributor.StreamState
State information for the stream, indicating the number of bytes that are currently
streamable.
|
static interface |
StreamByteDistributor.Writer
Object that performs the writing of the bytes that have been allocated for a stream.
|
Modifier and Type | Method and Description |
---|---|
boolean |
distribute(int maxBytes,
StreamByteDistributor.Writer writer)
Distributes up to
maxBytes to those streams containing streamable bytes and
iterates across those streams to write the appropriate bytes. |
void |
updateStreamableBytes(StreamByteDistributor.StreamState state)
Called when the streamable bytes for a stream has changed.
|
void updateStreamableBytes(StreamByteDistributor.StreamState state)
boolean distribute(int maxBytes, StreamByteDistributor.Writer writer) throws Http2Exception
maxBytes
to those streams containing streamable bytes and
iterates across those streams to write the appropriate bytes. Criteria for
traversing streams is undefined and it is up to the implementation to determine when to stop
at a given stream.
The streamable bytes are not automatically updated by calling this method. It is up to the
caller to indicate the number of bytes streamable after the write by calling
updateStreamableBytes(StreamState)
.
maxBytes
- the maximum number of bytes to write.true
if there are still streamable bytes that have not yet been written,
otherwise false
.Http2Exception
- If an internal exception occurs and internal connection state would otherwise be
corrupted.Copyright © 2008–2016 The Netty Project. All rights reserved.