- All Implemented Interfaces:
Serializable
,Comparable<Http2StreamState>
,Constable
Stream state.
See
https://datatracker.ietf.org/doc/html/rfc7540#section-5.1
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionClosed stream.Local stream is closed, remote stream is open.Remote stream is closed, local stream is open.The initial state of a stream.Both local and remote streams are open.Push promise sent (not supported by Helidon).Push promise received (not supported by Helidon). -
Method Summary
Modifier and TypeMethodDescriptionstatic Http2StreamState
checkAndGetState
(Http2StreamState current, Http2FrameType frameType, boolean send, boolean endOfStream, boolean endOfHeaders) Check that the frame is ok for current state.static Http2StreamState
Returns the enum constant of this class with the specified name.static Http2StreamState[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
IDLE
The initial state of a stream.Transitions to this state: none
Transitions from this state:
-
RESERVED_LOCAL
Push promise sent (not supported by Helidon).Transitions to this state:
IDLE
-> sendHttp2FrameType.PUSH_PROMISE
Transitions from this state:
- send
Http2FrameType.HEADERS
->HALF_CLOSED_REMOTE
- send
Http2FrameType.RST_STREAM
->CLOSED
- recv
Http2FrameType.RST_STREAM
->CLOSED
-
RESERVED_REMOTE
Push promise received (not supported by Helidon).Transitions to this state:
IDLE
-> recvHttp2FrameType.PUSH_PROMISE
Transitions from this state:
- recv
Http2FrameType.HEADERS
->HALF_CLOSED_LOCAL
- recv
Http2FrameType.RST_STREAM
->CLOSED
- send
Http2FrameType.RST_STREAM
->CLOSED
-
OPEN
Both local and remote streams are open.Transitions to this state:
IDLE
-> sendHttp2FrameType.HEADERS
IDLE
-> recvHttp2FrameType.HEADERS
Transitions from this state (end of stream may be part of
Http2FrameType.HEADERS
orHttp2FrameType.DATA
):- send
Http2Flag.END_OF_STREAM
->HALF_CLOSED_LOCAL
- recv
Http2Flag.END_OF_STREAM
->HALF_CLOSED_REMOTE
- send
Http2FrameType.RST_STREAM
->CLOSED
- recv
Http2FrameType.RST_STREAM
->CLOSED
-
HALF_CLOSED_LOCAL
Local stream is closed, remote stream is open.Transitions to this state:
RESERVED_REMOTE
-> recvHttp2FrameType.HEADERS
OPEN
-> sendHttp2Flag.END_OF_STREAM
Transitions from this state:
- recv
Http2Flag.END_OF_STREAM
->CLOSED
- send
Http2FrameType.RST_STREAM
->CLOSED
- recv
Http2FrameType.RST_STREAM
->CLOSED
-
HALF_CLOSED_REMOTE
Remote stream is closed, local stream is open.Transitions to this state:
RESERVED_LOCAL
-> sendHttp2FrameType.HEADERS
OPEN
-> recvHttp2Flag.END_OF_STREAM
Transitions from this state:
- send
Http2Flag.END_OF_STREAM
->CLOSED
- send
Http2FrameType.RST_STREAM
->CLOSED
- recv
Http2FrameType.RST_STREAM
->CLOSED
-
CLOSED
Closed stream. Transitions to this state:HALF_CLOSED_REMOTE
-> by sending "END_STREAM", sending or receivingHttp2FrameType.RST_STREAM
HALF_CLOSED_LOCAL
-> by receiving "END_STREAM", sending or receivingHttp2FrameType.RST_STREAM
OPEN
,RESERVED_LOCAL
, orRESERVED_REMOTE
- by sending or receivingHttp2FrameType.RST_STREAM
Transitions from this state: none
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
checkAndGetState
public static Http2StreamState checkAndGetState(Http2StreamState current, Http2FrameType frameType, boolean send, boolean endOfStream, boolean endOfHeaders) Check that the frame is ok for current state.- Parameters:
current
- current stream stateframeType
- frame typesend
- sendendOfStream
- whether end of streamendOfHeaders
- whether end of headers- Returns:
- stream state
-