Class Http2StreamHandling.StreamState

  • Direct Known Subclasses:
    Http2StreamHandling.Closed$, Http2StreamHandling.HalfClosedLocalWaitingForPeerStream, Http2StreamHandling.HalfClosedRemoteSendingData, Http2StreamHandling.HalfClosedRemoteWaitingForOutgoingStream, Http2StreamHandling.Idle$, Http2StreamHandling.OpenSendingData, Http2StreamHandling.ReceivingData
    Enclosing interface:
    Http2StreamHandling

    public abstract static class Http2StreamHandling.StreamState
    extends java.lang.Object
    States roughly correspond to states as given in https://http2.github.io/http2-spec/#StreamStates.

    Substates were introduced to also track the state of our user-side

    States: * Idle | server | client <- Idle, initial state, usually not tracked explicitly * OpenReceivingDataFirst | server <- Open, got (request) HEADERS but didn't send (response) HEADERS yet * OpenSendingData | client <- Open, sent (request) HEADERS but didn't receive (response) HEADERS yet * Open | server | client <- Open, bidirectional, both sides sent HEADERS * HalfClosedLocalWaitingForPeerStream | client <- HalfClosedLocal, our stream side done, waiting for peer HEADERS * HalfClosedLocal | server | client <- HalfClosedLocal, all HEADERS sent, sent our endStream = true, receiving DATA from peer * HalfClosedRemoteWaitingForOutgoingStream | server <- HalfClosedRemote, waiting for our HEADERS from user * HalfClosedRemoteSendingData | server | client <- HalfClosedRemote, sent our HEADERS, now sending out DATA * Closed | server | client <- Closed, final state, not tracked explicitly

    Server states: * Idle -> OpenReceivingDataFirst: on receiving request HEADERS with endStream = false * Idle -> HalfClosedRemoteWaitingForOutgoingStream: on receiving HEADERS with endStream = true * OpenReceivingDataFirst -> HalfClosedRemoteWaitingForOutgoingStream: after receiving endStream * OpenReceivingDataFirst -> Open: after user provided response before request was fully streamed in * HalfClosedRemoteWaitingForOutgoingStream -> HalfClosedRemoteSendingData: we sent response HEADERS with endStream = false * HalfClosedRemoteWaitingForOutgoingStream -> Closed: we sent response HEADERS with endStream = true * HalfClosedRemoteSendingData -> Closed: we sent DATA with endStream = true * Open -> HalfClosedRemoteSendingData: on receiving request DATA with endStream = true * Open -> HalfClosedLocal: on receiving response DATA with endStream = true before request has been fully received (uncommon) * HalfClosedLocal -> Closed: on receiving request DATA with endStream = true

    Client states: * Idle -> OpenSendingData: on sending out (request) HEADERS with endStream = false * Idle -> HalfClosedLocalWaitingForPeerStream: on sending out (request) HEADERS with endStream = true * OpenSendingData -> HalfClosedLocalWaitingForPeerStream: on sending out DATA with endStream = true * OpenSendingData -> Open: on receiving response HEADERS before request DATA was fully sent out * HalfClosedLocalWaitingForPeerStream -> HalfClosedLocal: on receiving response HEADERS with endStream = false * HalfClosedLocalWaitingForPeerStream -> Closed: on receiving response HEADERS with endStream = true * HalfClosedLocal -> Closed: on receiving response DATA with endStream = true * Open -> HalfClosedLocal: on sending out request DATA with endStream = true * Open -> HalfClosedRemoteSendingData: on receiving response DATA with endStream = true before request has been fully sent out (uncommon) * HalfClosedRemoteSendingData -> Closed: on sending out request DATA with endStream = true