APIdia Launch Partner
Top Description Inners Methods
jdk.internal.net.http.quic.streams

public non-sealed Interface QuicBidiStream

extends QuicStream, QuicReceiverStream, QuicSenderStream
Known Direct Implementers
jdk.internal.net.http.quic.streams.QuicBidiStreamImpl

An interface that represents a bidirectional stream. A bidirectional stream implements both QuicSenderStream and QuicReceiverStream.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
QuicBidiStream.BidiStreamState

The state of a bidirectional stream can be obtained by combining the state of its sending part and receiving part.</quote>

Method Summary

Modifier and TypeMethod and Description
public default QuicBidiStream.BidiStreamState

Returns:

a composed simplified state computed from the state of the receiving part and sending part of the stream
getBidiStreamState
()

Returns a composed simplified state computed from the state of the receiving part and sending part of the stream.

public default boolean
public default QuicStream.StreamState
state()

Implements jdk.internal.net.http.quic.streams.QuicStream.state.

Returns the combined stream state.

Inherited from jdk.internal.net.http.quic.streams.QuicReceiverStream:
connectReaderdataReceiveddisconnectReaderisStopSendingRequestedmaxStreamDatarcvErrorCodereceivingStaterequestStopSending
Inherited from jdk.internal.net.http.quic.streams.QuicSenderStream:
connectWriterdataSentdisconnectWriterresetsendingStatesndErrorCodestopSendingReceived
Inherited from jdk.internal.net.http.quic.streams.QuicStream:
isBidirectionalisClientInitiatedisLocalInitiatedisRemoteInitiatedisServerInitiatedmodestreamIdtype

Method Detail

getBidiStreamStateback to summary
public default QuicBidiStream.BidiStreamState getBidiStreamState()

Returns a composed simplified state computed from the state of the receiving part and sending part of the stream.

See RFC 9000, [Section 3.4] (https://www.rfc-editor.org/rfc/rfc9000#name-bidirectional-stream-states)

Returns:QuicBidiStream.BidiStreamState

a composed simplified state computed from the state of the receiving part and sending part of the stream

hasErrorback to summary
public default boolean hasError()

Overrides default jdk.internal.net.http.quic.streams.QuicReceiverStream.hasError, jdk.internal.net.http.quic.streams.QuicSenderStream.hasError.

Implements jdk.internal.net.http.quic.streams.QuicStream.hasError.

Doc from jdk.internal.net.http.quic.streams.QuicStream.hasError.

Returns true if the stream has errors. For a bidirectional stream, this method returns true if either its sending part or its receiving part was closed with a non-zero error code.

Annotations
@Override
stateback to summary
public default QuicStream.StreamState state()

Implements jdk.internal.net.http.quic.streams.QuicStream.state.

Doc from jdk.internal.net.http.quic.streams.QuicStream.state.

Returns the combined stream state.

Annotations
@Override
jdk.internal.net.http.quic.streams back to summary

public final Enum QuicBidiStream.BidiStreamState

extends Enum<QuicBidiStream.BidiStreamState>
implements StreamState
Class Inheritance
All Implemented Interfaces
jdk.internal.net.http.quic.streams.QuicStream.StreamState

The state of a bidirectional stream can be obtained by combining the state of its sending part and receiving part. A bidirectional stream is composed of sending and receiving parts. Implementations can represent states of the bidirectional stream as composites of sending and receiving stream states. The simplest model presents the stream as "open" when either sending or receiving parts are in a non-terminal state and "closed" when both sending and receiving streams are in terminal states. See RFC 9000, [Section 3.4] (https://www.rfc-editor.org/rfc/rfc9000#name-bidirectional-stream-states)

Field Summary

Modifier and TypeField and Description
public static final QuicBidiStream.BidiStreamState
CLOSED

A bidirectional stream is considered closed when both parts have been reset or all data has been sent and acknowledged and all data has been received.

public static final QuicBidiStream.BidiStreamState
HALF_CLOSED_LOCAL

A bidirectional stream is considered locally half closed if the sending part is locally closed: all data has been sent and acknowledged, or a reset has been sent, but the receiving part is still receiving.

public static final QuicBidiStream.BidiStreamState
HALF_CLOSED_REMOTE

A bidirectional stream is considered remotely half closed if the receiving part is closed: all data has been read or received on the receiving part, or reset has been read or received on the receiving part, but the sending part is still sending.

public static final QuicBidiStream.BidiStreamState
IDLE

A bidirectional stream is considered "idle" if no data has been sent or received on that stream.

public static final QuicBidiStream.BidiStreamState
OPENED

A bidirectional stream is considered "open" until all data has been received, or all data has been sent, and no reset has been sent or received.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean
isTerminal()

Implements jdk.internal.net.http.quic.streams.QuicStream.StreamState.isTerminal.

Returns true if this is a terminal state.

public static QuicBidiStream.BidiStreamState
public static QuicBidiStream.BidiStreamState[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CLOSEDback to summary
public static final QuicBidiStream.BidiStreamState CLOSED

A bidirectional stream is considered closed when both parts have been reset or all data has been sent and acknowledged and all data has been received.

HALF_CLOSED_LOCALback to summary
public static final QuicBidiStream.BidiStreamState HALF_CLOSED_LOCAL

A bidirectional stream is considered locally half closed if the sending part is locally closed: all data has been sent and acknowledged, or a reset has been sent, but the receiving part is still receiving.

HALF_CLOSED_REMOTEback to summary
public static final QuicBidiStream.BidiStreamState HALF_CLOSED_REMOTE

A bidirectional stream is considered remotely half closed if the receiving part is closed: all data has been read or received on the receiving part, or reset has been read or received on the receiving part, but the sending part is still sending.

IDLEback to summary
public static final QuicBidiStream.BidiStreamState IDLE

A bidirectional stream is considered "idle" if no data has been sent or received on that stream.

OPENEDback to summary
public static final QuicBidiStream.BidiStreamState OPENED

A bidirectional stream is considered "open" until all data has been received, or all data has been sent, and no reset has been sent or received.

Constructor Detail

BidiStreamStateback to summary
private BidiStreamState()

Method Detail

isTerminalback to summary
public boolean isTerminal()

Implements jdk.internal.net.http.quic.streams.QuicStream.StreamState.isTerminal.

Doc from jdk.internal.net.http.quic.streams.QuicStream.StreamState.isTerminal.

Returns true if this is a terminal state.

API Note

A bidirectional stream may be considered closed (which is a terminal state), even if the sending or receiving part of a stream haven't reached a terminal state. Typically, if the sending part has sent a RESET frame, the stream may be considered closed even if the acknowledgement hasn't been received yet.

Annotations
@Override
valueOfback to summary
public static QuicBidiStream.BidiStreamState valueOf(String name)
valuesback to summary
public static QuicBidiStream.BidiStreamState[] values()