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

pack-priv abstract sealed Class AbstractQuicStream

extends Object
implements QuicStream
permits QuicBidiStreamImpl, QuicSenderStreamImpl, QuicReceiverStreamImpl
Class Inheritance
All Implemented Interfaces
jdk.internal.net.http.quic.streams.QuicStream
Known Direct Subclasses
jdk.internal.net.http.quic.streams.QuicBidiStreamImpl, jdk.internal.net.http.quic.streams.QuicReceiverStreamImpl, jdk.internal.net.http.quic.streams.QuicSenderStreamImpl
Imports
jdk.internal.net.http.quic.QuicConnectionImpl

An abstract class 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 AbstractQuicStream should implement QuicSenderStream (unidirectional StreamMode#WRITE_ONLY stream), or QuicReceiverStream (unidirectional StreamMode#READ_ONLY stream), or both (bidirectional StreamMode#READ_WRITE stream).

Field Summary

Modifier and TypeField and Description
private final QuicConnectionImpl
private final QuicStream.StreamMode
private final long

Constructor Summary

AccessConstructor and Description
pack-priv
AbstractQuicStream(QuicConnectionImpl connection, long streamId)

Method Summary

Modifier and TypeMethod and Description
pack-priv final QuicConnectionImpl

Returns:

the QuicConnectionImpl instance this stream belongs to
connection
()

Returns the QuicConnectionImpl instance this stream belongs to.

public final boolean
isBidirectional()

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

Returns whether this stream is bidirectional.

public final boolean
isClientInitiated()

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

Returns whether this stream is client initiated.

public abstract boolean

Returns:

true if this stream isn't expecting anything from the peer and can be removed from the streams map
isDone
()

Returns true if this stream isn't expecting anything from the peer and can be removed from the streams map.

public final boolean
isLocalInitiated()

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

Returns true if this stream is local initiated.

public final boolean
isRemoteInitiated()

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

Returns true if this stream is remote initiated.

public final boolean
isServerInitiated()

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

Returns whether this stream is server initiated.

private static QuicStream.StreamMode
mode(QuicConnectionImpl connection, long streamId)

public final QuicStream.StreamMode
mode()

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

Returns this stream operation mode.

public final long
streamId()

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

Returns the stream ID of this stream.

public final int
type()

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

The type of this stream, as an int.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

connectionback to summary
private final QuicConnectionImpl connection
modeback to summary
private final QuicStream.StreamMode mode
streamIdback to summary
private final long streamId

Constructor Detail

AbstractQuicStreamback to summary
pack-priv AbstractQuicStream(QuicConnectionImpl connection, long streamId)

Method Detail

connectionback to summary
pack-priv final QuicConnectionImpl connection()

Returns the QuicConnectionImpl instance this stream belongs to.

Returns:QuicConnectionImpl

the QuicConnectionImpl instance this stream belongs to

isBidirectionalback to summary
public final boolean isBidirectional()

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

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

Returns whether this stream is bidirectional.

Annotations
@Override
isClientInitiatedback to summary
public final boolean isClientInitiated()

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

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

Returns whether this stream is client initiated.

Annotations
@Override
isDoneback to summary
public abstract boolean isDone()

Returns true if this stream isn't expecting anything from the peer and can be removed from the streams map.

Returns:boolean

true if this stream isn't expecting anything from the peer and can be removed from the streams map

isLocalInitiatedback to summary
public final boolean isLocalInitiated()

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

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

Returns true if this stream is local initiated.

Annotations
@Override
isRemoteInitiatedback to summary
public final boolean isRemoteInitiated()

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

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

Returns true if this stream is remote initiated.

Annotations
@Override
isServerInitiatedback to summary
public final boolean isServerInitiated()

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

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

Returns whether this stream is server initiated.

Annotations
@Override
modeback to summary
private static QuicStream.StreamMode mode(QuicConnectionImpl connection, long streamId)
modeback to summary
public final QuicStream.StreamMode mode()

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

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

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

Annotations
@Override
streamIdback to summary
public final long streamId()

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

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

Returns the stream ID of this stream.

Annotations
@Override
typeback to summary
public final int type()

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

Doc from jdk.internal.net.http.quic.streams.QuicStream.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
Annotations
@Override