| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private class | QuicSenderStreamImpl.
The stream internal implementation of a QuicStreamWriter. |
| private class | QuicSenderStreamImpl.
A concrete implementation of the |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final Logger | |
| private volatile long | |
| private final QuicSenderStreamImpl. | |
| private volatile QuicSenderStream. | |
| private volatile boolean | |
| private volatile QuicSenderStreamImpl. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public long | Returns: the number of bytes that are available for sending, subject to flow controlReturns the number of bytes that are available for sending, subject to flow control. |
| pack-priv void | |
| public QuicStreamWriter | connectWriter(SequentialScheduler scheduler)
Implements jdk. Connects a writer to the sending end of this stream. |
| public boolean | Returns: true if the state was switched to DATA_RECVD as a result of this method invocationthe final size acknowledged finalSize)Called when the packet containing the final STREAM frame for this stream has been acknowledged. |
| public long | dataSent()
Implements jdk. Returns the amount of data that has been sent. |
| pack-priv String | |
| public void | disconnectWriter(QuicStreamWriter writer)
Implements jdk. Disconnect the writer, so that a new writer can be connected. |
| public boolean | Returns: true if sending is blocked due to flow controlWhether the sending is blocked due to flow control. |
| public boolean | isDone()
Implements abstract jdk. Returns true if this stream isn't expecting anything from the peer and can be removed from the streams map. |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private void | |
| public ByteBuffer | Returns: a ByteBuffer containing at mostmaxBytes remaining
bytes.the maximum number of bytes to poll for sending maxBytes)Polls at most |
| public void | reset(long errorCode)
Implements jdk. Abruptly closes the writing side of a stream by sending a RESET_STREAM frame. |
| public boolean | Returns: true if the state was switched to RESET_RECVD as a result of this method invocationthe final size acknowledged finalSize)Called when the packet containing the RESET_STREAM frame for this stream has been acknowledged. |
| public void | |
| private QuicSenderStream. | Returns: the state before switching to SEND.whether there will be no further data submitted
by the producer. last)Called when some data is submitted (or offered) by the producer. |
| public QuicSenderStream. | sendingState()
Implements jdk. Returns the sending state of the stream. |
| private void | |
| public long | Returns: the new limit that has been finalized for max stream data. This new limit may or may not have been increased to the proposednewLimit.the proposed new max stream data newLimit)Called to set the max stream data for this stream. |
| public long | sndErrorCode()
Implements jdk. Returns the error code for this stream, or |
| public QuicStream. | state()
Implements jdk. Returns the combined stream state. |
| public boolean | stopSendingReceived()
Implements jdk. Returns true if STOP_SENDING was received. |
| public void | stopSendingReceived(long
the error code errorCode)Called when a STOP_SENDING frame is received from the peer |
| public long | |
| private boolean | switchSendingState(QuicSenderStream.
the new state, according to the StreamWriterQueue. newStateCalled when the StreamWriterQueue implementation notifies of a state change. |
| pack-priv void | terminate(final TerminationCause
the termination cause terminationCause)Called when the connection is closed locally |
| private static long |
| dbgTag | back to summary |
|---|---|
| private final String dbgTag | |
| debug | back to summary |
|---|---|
| private final Logger debug | |
| errorCode | back to summary |
|---|---|
| private volatile long errorCode | |
| queue | back to summary |
|---|---|
| private final QuicSenderStreamImpl. | |
| sendingState | back to summary |
|---|---|
| private volatile QuicSenderStream. | |
| stopSendingReceived | back to summary |
|---|---|
| private volatile boolean stopSendingReceived | |
| writer | back to summary |
|---|---|
| private volatile QuicSenderStreamImpl. | |
| QuicSenderStreamImpl | back to summary |
|---|---|
| pack-priv QuicSenderStreamImpl(QuicConnectionImpl connection, long streamId) | |
| available | back to summary |
|---|---|
| public long available() Returns the number of bytes that are available for sending, subject to flow control. Implementation Specification This method does not return more than what flow control for this stream would allow at the time the method is called. Implementation Note If the sender part is not finished initializing the default implementation of this method will return 0.
| |
| checkOpened | back to summary |
|---|---|
| pack-priv void checkOpened() throws IOException | |
| connectWriter | back to summary |
|---|---|
| public QuicStreamWriter connectWriter(SequentialScheduler scheduler) Implements jdk. Doc from jdk. Connects a writer to the sending end of this stream.
| |
| dataAcknowledged | back to summary |
|---|---|
| public boolean dataAcknowledged(long finalSize) Called when the packet containing the final STREAM frame for this stream has been acknowledged.
| |
| dataSent | back to summary |
|---|---|
| public long dataSent() Implements jdk. Doc from jdk. Returns the amount of data that has been sent.
| |
| dbgTag | back to summary |
|---|---|
| pack-priv String dbgTag() | |
| disconnectWriter | back to summary |
|---|---|
| public void disconnectWriter(QuicStreamWriter writer) Implements jdk. Doc from jdk. Disconnect the writer, so that a new writer can be connected.
| |
| isBlocked | back to summary |
|---|---|
| public boolean isBlocked() Whether the sending is blocked due to flow control.
| |
| isDone | back to summary |
|---|---|
| public boolean isDone() Implements abstract jdk. Doc from jdk. Returns true if this stream isn't expecting anything from the peer and can be removed from the streams map.
| |
| markDataRecvd | back to summary |
|---|---|
| private boolean markDataRecvd() | |
| markDataSent | back to summary |
|---|---|
| private boolean markDataSent() | |
| markResetRecvd | back to summary |
|---|---|
| private boolean markResetRecvd() | |
| markResetSent | back to summary |
|---|---|
| private boolean markResetSent() | |
| markSending | back to summary |
|---|---|
| private boolean markSending() | |
| notifyTerminalState | back to summary |
|---|---|
| private void notifyTerminalState(QuicSenderStream. | |
| poll | back to summary |
|---|---|
| public ByteBuffer poll(int maxBytes) Polls at most
| |
| reset | back to summary |
|---|---|
| public void reset(long errorCode) throws IOException Implements jdk. Doc from jdk. Abruptly closes the writing side of a stream by sending a RESET_STREAM frame.
| |
| resetAcknowledged | back to summary |
|---|---|
| public boolean resetAcknowledged(long finalSize) Called when the packet containing the RESET_STREAM frame for this stream has been acknowledged.
| |
| resetSent | back to summary |
|---|---|
| public void resetSent() Called by | |
| sending | back to summary |
|---|---|
| private QuicSenderStream. Called when some data is submitted (or offered) by the producer. If the stream is in the READY state, this will switch the sending state to SEND. Implementation Note The parameter
| |
| sendingState | back to summary |
|---|---|
| public QuicSenderStream. Implements jdk. Doc from jdk. Returns the sending state of the stream.
| |
| setErrorCode | back to summary |
|---|---|
| private void setErrorCode(long code) | |
| setMaxStreamData | back to summary |
|---|---|
| public long setMaxStreamData(final long newLimit) Called to set the max stream data for this stream. API Note as per RFC 9000, any value less than the current max stream data is ignored
| |
| sndErrorCode | back to summary |
|---|---|
| public long sndErrorCode() Implements jdk. Doc from jdk. Returns the error code for this stream, or
| |
| state | back to summary |
|---|---|
| public QuicStream. Implements jdk. Doc from jdk. Returns the combined stream state.
| |
| stopSendingReceived | back to summary |
|---|---|
| public boolean stopSendingReceived() Implements jdk. Doc from jdk. Returns true if STOP_SENDING was received.
| |
| stopSendingReceived | back to summary |
|---|---|
| public void stopSendingReceived(long errorCode) Called when a STOP_SENDING frame is received from the peer
| |
| streamSize | back to summary |
|---|---|
| public long streamSize() Returns the size of this stream, if known. Implementation Specification This method returns
| |
| switchSendingState | back to summary |
|---|---|
| private boolean switchSendingState(QuicSenderStream. Called when the StreamWriterQueue implementation notifies of a state change.
| |
| terminate | back to summary |
|---|---|
| pack-priv void terminate(final TerminationCause terminationCause) Called when the connection is closed locally
| |
| validateStreamId | back to summary |
|---|---|
| private static long validateStreamId(QuicConnectionImpl connection, long streamId) | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final VarHandle | |
| pack-priv static final VarHandle | |
| pack-priv static final VarHandle |
| Access | Constructor and Description |
|---|---|
| private |
| ERROR_CODE | back to summary |
|---|---|
| pack-priv static final VarHandle ERROR_CODE | |
| SENDING_STATE | back to summary |
|---|---|
| pack-priv static final VarHandle SENDING_STATE | |
| WRITER | back to summary |
|---|---|
| pack-priv static final VarHandle WRITER | |
| Handles | back to summary |
|---|---|
| private Handles() | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| 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 |
| pack-priv IOException | Returns: a new IOExceptionCompose an exception to throw if data is submitted after the the final data has been sent |
| pack-priv IOException | Returns: a new IOExceptionCompose an exception to throw if data is submitted after the stream was reset |
| pack-priv void |
| QuicStreamWriterImpl | back to summary |
|---|---|
| pack-priv QuicStreamWriterImpl(SequentialScheduler scheduler) | |
| checkConnected | back to summary |
|---|---|
| private void checkConnected() | |
| 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
| |
| streamClosedException | back to summary |
|---|---|
| pack-priv IOException streamClosedException() Compose an exception to throw if data is submitted after the the final data has been sent
| |
| streamResetException | back to summary |
|---|---|
| pack-priv IOException streamResetException() Compose an exception to throw if data is submitted after the stream was reset
| |
| wakeupWriter | back to summary |
|---|---|
| pack-priv void wakeupWriter() | |
StreamWriterQueue for this
stream.
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| protected Logger | |
| protected long | streamId()
Implements abstract jdk. Returns the stream id this queue was created for. |
| protected void | switchState(QuicSenderStream.
Implements abstract jdk. Called to switch the sending state when data has been sent. |
| protected void | wakeupConsumer()
Implements abstract jdk. This method is called to wake up the consumer when there is credit and data available for the consumer. |
| protected void | wakeupProducer()
Implements abstract jdk. This method is called to wake up the producer when there is credit available for the producer. |
| StreamWriterQueueImpl | back to summary |
|---|---|
| private StreamWriterQueueImpl() | |
| debug | back to summary |
|---|---|
| protected Logger debug() Implements abstract jdk.
| |
| streamId | back to summary |
|---|---|
| protected long streamId() Implements abstract jdk. Doc from jdk. Returns the stream id this queue was created for.
| |
| switchState | back to summary |
|---|---|
| protected void switchState(QuicSenderStream. Implements abstract jdk. Doc from jdk. Called to switch the sending state when data has been sent.
| |
| wakeupConsumer | back to summary |
|---|---|
| protected void wakeupConsumer() Implements abstract jdk. Doc from jdk. This method is called to wake up the consumer when there is credit and data available for the consumer.
| |
| wakeupProducer | back to summary |
|---|---|
| protected void wakeupProducer() Implements abstract jdk. Doc from jdk. This method is called to wake up the producer when there is credit available for the producer.
| |