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

public sealed Interface QuicStream

permits QuicSenderStream, QuicReceiverStream, QuicBidiStream, AbstractQuicStream
Known Direct Subinterfaces
jdk.internal.net.http.quic.streams.QuicBidiStream, jdk.internal.net.http.quic.streams.QuicReceiverStream, jdk.internal.net.http.quic.streams.QuicSenderStream
Known Direct Implementers
jdk.internal.net.http.quic.streams.AbstractQuicStream

An interface to model a QuicStream. A quic stream can be either unidirectional or bidirectional. A unidirectional stream can be opened for reading or for writing. Concrete subclasses of QuicStream should implement QuicSenderStream (unidirectional StreamMode#WRITE_ONLY stream), or QuicReceiverStream (unidirectional StreamMode#READ_ONLY stream), or QuicBidiStream (bidirectional StreamMode#READ_WRITE stream).

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
QuicStream.StreamMode

The stream operation mode.

public static interface
QuicStream.StreamState

An interface that unifies the three different stream states.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the stream has errors
hasError
()

Returns true if the stream has errors.

public boolean

Returns:

whether this stream is bidirectional
isBidirectional
()

Returns whether this stream is bidirectional.

public boolean

Returns:

whether this stream is client initiated
isClientInitiated
()

Returns whether this stream is client initiated.

public boolean

Returns:

true if this stream is local initiated
isLocalInitiated
()

Returns true if this stream is local initiated.

public boolean

Returns:

true if this stream is remote initiated
isRemoteInitiated
()

Returns true if this stream is remote initiated.

public boolean

Returns:

whether this stream is server initiated
isServerInitiated
()

Returns whether this stream is server initiated.

public QuicStream.StreamMode

Returns:

this stream operation mode
mode
()

Returns this stream operation mode.

public QuicStream.StreamState

Returns:

the combined stream state
state
()

Returns the combined stream state.

public long

Returns:

the stream ID of this stream
streamId
()

Returns the stream ID of this stream.

public int

Returns:

the type of this stream, as an int
type
()

The type of this stream, as an int.

Method Detail

hasErrorback to summary
public boolean 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.

Returns:boolean

true if the stream has errors

isBidirectionalback to summary
public boolean isBidirectional()

Returns whether this stream is bidirectional.

Returns:boolean

whether this stream is bidirectional

isClientInitiatedback to summary
public boolean isClientInitiated()

Returns whether this stream is client initiated.

Returns:boolean

whether this stream is client initiated

isLocalInitiatedback to summary
public boolean isLocalInitiated()

Returns true if this stream is local initiated.

Returns:boolean

true if this stream is local initiated

isRemoteInitiatedback to summary
public boolean isRemoteInitiated()

Returns true if this stream is remote initiated.

Returns:boolean

true if this stream is remote initiated

isServerInitiatedback to summary
public boolean isServerInitiated()

Returns whether this stream is server initiated.

Returns:boolean

whether this stream is server initiated

modeback to summary
public QuicStream.StreamMode mode()

Returns this stream operation mode. One of StreamMode#READ_ONLY, StreamMode#WRITE_ONLY, or StreamMode#READ_WRITE.

Returns:QuicStream.StreamMode

this stream operation mode

stateback to summary
public QuicStream.StreamState state()

Returns the combined stream state.

API Note

This is mostly used for logging purposes, to log the combined state of a stream.

Returns:QuicStream.StreamState

the combined stream state

streamIdback to summary
public long streamId()

Returns the stream ID of this stream.

Returns:long

the stream ID of this stream

typeback to summary
public int type()

The type of this stream, as an int. This is a number between 0 and 3 inclusive, and corresponds to the last two lowest bits of the stream ID.

  • 0x00: bidirectional, client initiated
  • 0x01: bidirectional, server initiated
  • 0x02: unidirectional, client initiated
  • 0x03: unidirectional, server initiated
Returns:int

the type of this stream, as an int

jdk.internal.net.http.quic.streams back to summary

public final Enum QuicStream.StreamMode

extends Enum<QuicStream.StreamMode>
Class Inheritance

The stream operation mode. One of READ_ONLY, WRITE_ONLY, or READ_WRITE.

Field Summary

Modifier and TypeField and Description
public static final QuicStream.StreamMode
public static final QuicStream.StreamMode
public static final QuicStream.StreamMode

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if this operation mode allows reading data from the stream
isReadable
()

Returns true if this operation mode allows reading data from the stream.

public boolean

Returns:

true if this operation mode allows writing data to the stream
isWritable
()

Returns true if this operation mode allows writing data to the stream.

public static QuicStream.StreamMode
public static QuicStream.StreamMode[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

READ_ONLYback to summary
public static final QuicStream.StreamMode READ_ONLY
READ_WRITEback to summary
public static final QuicStream.StreamMode READ_WRITE
WRITE_ONLYback to summary
public static final QuicStream.StreamMode WRITE_ONLY

Constructor Detail

StreamModeback to summary
private StreamMode()

Method Detail

isReadableback to summary
public boolean isReadable()

Returns true if this operation mode allows reading data from the stream.

Returns:boolean

true if this operation mode allows reading data from the stream

isWritableback to summary
public boolean isWritable()

Returns true if this operation mode allows writing data to the stream.

Returns:boolean

true if this operation mode allows writing data to the stream

valueOfback to summary
public static QuicStream.StreamMode valueOf(String name)
valuesback to summary
public static QuicStream.StreamMode[] values()
jdk.internal.net.http.quic.streams back to summary

public sealed Interface QuicStream.StreamState

permits ReceivingStreamState, SendingStreamState, BidiStreamState
Known Direct Implementers
jdk.internal.net.http.quic.streams.QuicBidiStream.BidiStreamState, jdk.internal.net.http.quic.streams.QuicReceiverStream.ReceivingStreamState, jdk.internal.net.http.quic.streams.QuicSenderStream.SendingStreamState

An interface that unifies the three different stream states.

API Note

This is mostly used for logging purposes, to log the combined state of a stream.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if this is a terminal state
isTerminal
()

Returns true if this is a terminal state.

public String
name()

Method Detail

isTerminalback to summary
public boolean isTerminal()

Returns true if this is a terminal state.

Returns:boolean

true if this is a terminal state

nameback to summary
public String name()