| Modifier and Type | Class and Description |
|---|---|
| pack-priv class | QueuingStreamPair.
A class that wraps the actual |
| Modifier and Type | Field and Description |
|---|---|
| protected final ConcurrentLinkedQueue |
| Access | Constructor and Description |
|---|---|
| public | QueuingStreamPair(Http3Streams.
the HTTP/3 stream type streamType,the underlying Quic connection quicConnection, Consumer<ByteBuffer> the receiver callback receiver, UniStreamPair.the error handler invoked in case of read errors errorHandler,the debug logger logger)Creates a new |
| Modifier and Type | Method and Description |
|---|---|
| public long | Returns: the available credit, taking into account data that has not been submitted yetReturns the available credit, taking into account data that has not been submitted yet. |
| pack-priv void | localWriterLoop()
Overrides jdk. This method is overridden by |
| public final void | submitData(ByteBuffer
the data to submit buffer)Submit data to be written to the sending stream via this object's internal queue. |
| pack-priv QuicStreamWriter | wrap(QuicStreamWriter writer)
Overrides jdk. Used by subclasses to redirect queuing of data to the subclass queue. |
| writerQueue | back to summary |
|---|---|
| protected final ConcurrentLinkedQueue<ByteBuffer> writerQueue | |
| QueuingStreamPair | back to summary |
|---|---|
| public QueuingStreamPair(Http3Streams. Creates a new This class implements a read loop and a write loop.
The read loop will call the given Data can be written to the stream simply by submitting it to the internal unbounded queue managed by this stream. When the stream becomes writable, the write loop is invoked and all pending data in the queue is written to the stream, until the stream is blocked or the queue is empty.
| |
| credit | back to summary |
|---|---|
| public long credit() Returns the available credit, taking into account data that has not been submitted yet. This is only weakly consistent.
| |
| localWriterLoop | back to summary |
|---|---|
| pack-priv void localWriterLoop() Overrides jdk. Doc from jdk. This method is overridden by
| |
| submitData | back to summary |
|---|---|
| public final void submitData(ByteBuffer buffer) Submit data to be written to the sending stream via this object's internal queue.
| |
| wrap | back to summary |
|---|---|
| pack-priv QuicStreamWriter wrap(QuicStreamWriter writer) Overrides jdk. Doc from jdk. Used by subclasses to redirect queuing of data to the subclass queue.
| |
QuicStreamWriter
and redirect everything to the QueuingStreamPair's
writerQueue - so that data is not sent out of order.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final QuicStreamWriter |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | connected()
Implements abstract jdk. Returns true if this writer is connected to its stream. |
| public long | credit()
Implements abstract jdk. Indicates how many bytes the writer is prepared to received for sending. |
| public void | queueForWriting(ByteBuffer buffer)
Implements abstract jdk. Queues a |
| public void | reset(long errorCode)
Implements abstract jdk. Abruptly resets the stream. |
| public void | scheduleForWriting(ByteBuffer buffer, boolean last)
Implements abstract jdk. Pushes a ByteBuffer to be scheduled for writing on the stream. |
| public QuicSenderStream. | sendingState()
Implements abstract jdk. Returns the sending state of the stream. |
| public QuicSenderStream | stream()
Implements abstract jdk. Returns the stream this writer is connected to, or |
| writer | back to summary |
|---|---|
| pack-priv final QuicStreamWriter writer | |
| QueuingWriter | back to summary |
|---|---|
| pack-priv QueuingWriter(QuicStreamWriter writer) | |
| connected | back to summary |
|---|---|
| public boolean connected() Implements abstract jdk. Doc from jdk. Returns true if this writer is connected to its stream.
| |
| credit | back to summary |
|---|---|
| public long credit() Implements abstract jdk. Doc from jdk. Indicates how many bytes the writer is
prepared to received for sending.
When that value grows from 0, and if the queue has
no pending data, the
| |
| queueForWriting | back to summary |
|---|---|
| public void queueForWriting(ByteBuffer buffer) throws IOException Implements abstract jdk. Doc from jdk. Queues a
| |
| reset | back to summary |
|---|---|
| public void reset(long errorCode) throws IOException Implements abstract jdk. Doc from jdk. Abruptly resets the stream.
| |
| scheduleForWriting | back to summary |
|---|---|
| public void scheduleForWriting(ByteBuffer buffer, boolean last) throws IOException Implements abstract jdk. Doc from jdk. Pushes a ByteBuffer to be scheduled for writing on the stream. The ByteBuffer will be wrapped in a StreamFrame before being sent. Data that cannot be sent due to a lack of flow credit will be buffered.
| |
| sendingState | back to summary |
|---|---|
| public QuicSenderStream. Implements abstract jdk. Doc from jdk. Returns the sending state of the stream.
| |
| stream | back to summary |
|---|---|
| public QuicSenderStream stream() Implements abstract jdk. Doc from jdk. Returns the stream this writer is connected to, or
| |