Interface Http2StreamHandling
- All Superinterfaces:
- org.apache.pekko.macros.LogHelper,- org.apache.pekko.macros.LogHelperMacro
public interface Http2StreamHandling
extends org.apache.pekko.macros.LogHelper
INTERNAL API
 
 Handles HTTP/2 stream states
 Accepts FrameEvents from the network side and emits ByteHttp2SubStreams for streams
 to be handled by the Pekko HTTP layer.
 
Mixed into the Http2ServerDemux graph logic.
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic classstatic classSpecial state that allows collecting some incoming data before dispatching it either as strict or streamed entitystatic classstatic classWe have closed the outgoing stream, but the incoming stream is still going.static classstatic classstatic classstatic classThey have closed the incoming stream, but the outgoing stream is still going.static classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic interfacestatic classstatic final classstatic classstatic classstatic interfacestatic classStates roughly correspond to states as given in https://http2.github.io/http2-spec/#StreamStates.
- 
Method SummaryModifier and TypeMethodDescriptionintClosed()Accessor for nested Scala objectvoiddispatchSubstream(FrameEvent.ParsedHeadersFrame initialHeaders, scala.util.Either<org.apache.pekko.util.ByteString, org.apache.pekko.stream.scaladsl.Source<Object, Object>> data, scala.collection.immutable.Map<AttributeKey<?>, Object> correlationAttributes) voiddistributeWindowDeltaToAllStreams(int delta) Called by multiplexer to distribute changes from INITIAL_WINDOW_SIZE to all streamsvoidenqueueOutStream(int streamId) voidhandleOutgoingCreated(Http2SubStream stream) Called by Http2ServerDemux when a stream comes in from the user-handlervoidhandleOutgoingEnded(int streamId) voidhandleOutgoingFailed(int streamId, Throwable cause) voidCalled by Http2ServerDemux to let the state machine handle StreamFrameEventsbooleanIdle()Accessor for nested Scala objectvoidincomingStreamPulled(int streamId) Entry-point to handle IncomingStreamBuffer.onPull through the state machinebooleanisServer()booleanintThe "last peer-initiated stream that was or might be processed on the sending endpoint in this connection"voidCalled when all streams in StreamHandling buffers are closed and the stage is completing.Accessor for nested Scala objectpullNextFrame(int streamId, int maxSize) Called by the multiplexer if ready to send a data framevoidpushGOAWAY(Http2Protocol.ErrorCode errorCode, String debug) voidresetStream(int streamId, Http2Protocol.ErrorCode errorCode) voidsetMaxConcurrentStreams(int newValue) settings()voidCalled to cleanup any state when the connection is torn downstreamFor(int streamId) voidTries to generate demand of SubStreams on the inlet from the user handler.voidupdateAllStates(scala.Function1<Http2StreamHandling.StreamState, Http2StreamHandling.StreamState> handle, String event, Object eventArg) voidupdateState(int streamId, scala.Function1<Http2StreamHandling.StreamState, Http2StreamHandling.StreamState> handle, String event, Object eventArg) <R> RupdateStateAndReturn(int streamId, scala.Function1<Http2StreamHandling.StreamState, scala.Tuple2<Http2StreamHandling.StreamState, R>> handle, String event, Object eventArg) scala.Option<HttpEntity.ChunkStreamPart>Methods inherited from interface org.apache.pekko.macros.LogHelperisDebugEnabled, isInfoEnabled, isWarningEnabled, log, prefixString
- 
Method Details- 
IdleHttp2StreamHandling.Idle$ Idle()Accessor for nested Scala object- Returns:
- (undocumented)
 
- 
ClosedHttp2StreamHandling.Closed$ Closed()Accessor for nested Scala object- Returns:
- (undocumented)
 
- 
OutStreamHttp2StreamHandling.OutStream$ OutStream()Accessor for nested Scala object- Returns:
- (undocumented)
 
- 
isServerboolean isServer()
- 
multiplexerHttp2Multiplexer multiplexer()
- 
settingsHttp2CommonSettings settings()
- 
pushGOAWAY
- 
dispatchSubstreamvoid dispatchSubstream(FrameEvent.ParsedHeadersFrame initialHeaders, scala.util.Either<org.apache.pekko.util.ByteString, org.apache.pekko.stream.scaladsl.Source<Object, Object>> data, scala.collection.immutable.Map<AttributeKey<?>, Object> correlationAttributes) 
- 
isUpgradedboolean isUpgraded()
- 
wrapTrailingHeaders
- 
flowControllerIncomingFlowController flowController()
- 
tryPullSubStreamsvoid tryPullSubStreams()Tries to generate demand of SubStreams on the inlet from the user handler. The attemp to demand will succeed if the inlet is open and has no pending pull, and, in the case of a client, if we're not exceedingthe number of active streams. This method must be invoked any time the collection of active streams or the value of maxConcurrentStreams are modified but the invocation must happen _after_ the collection or the limit are modified.
- 
lastStreamIdint lastStreamId()The "last peer-initiated stream that was or might be processed on the sending endpoint in this connection"- Returns:
- (undocumented)
 
- 
setMaxConcurrentStreamsvoid setMaxConcurrentStreams(int newValue) 
- 
hasCapacityToCreateStreamsboolean hasCapacityToCreateStreams()- Returns:
- true if the number of outgoing Active streams (Active includes Open and any variant of HalfClosedXxx) doesn't exceed MaxConcurrentStreams
 
- 
onAllStreamsClosedvoid onAllStreamsClosed()Called when all streams in StreamHandling buffers are closed and the stage is completing.
- 
streamFor
- 
activeStreamCountint activeStreamCount()
- 
handleStreamEventCalled by Http2ServerDemux to let the state machine handle StreamFrameEvents
- 
handleOutgoingCreatedCalled by Http2ServerDemux when a stream comes in from the user-handler
- 
handleOutgoingEndedvoid handleOutgoingEnded(int streamId) 
- 
handleOutgoingFailed
- 
distributeWindowDeltaToAllStreamsvoid distributeWindowDeltaToAllStreams(int delta) Called by multiplexer to distribute changes from INITIAL_WINDOW_SIZE to all streams
- 
pullNextFrameCalled by the multiplexer if ready to send a data frame
- 
incomingStreamPulledvoid incomingStreamPulled(int streamId) Entry-point to handle IncomingStreamBuffer.onPull through the state machine
- 
updateAllStatesvoid updateAllStates(scala.Function1<Http2StreamHandling.StreamState, Http2StreamHandling.StreamState> handle, String event, Object eventArg) 
- 
updateStatevoid updateState(int streamId, scala.Function1<Http2StreamHandling.StreamState, Http2StreamHandling.StreamState> handle, String event, Object eventArg) 
- 
enqueueOutStreamvoid enqueueOutStream(int streamId) 
- 
updateStateAndReturn<R> R updateStateAndReturn(int streamId, scala.Function1<Http2StreamHandling.StreamState, scala.Tuple2<Http2StreamHandling.StreamState, R>> handle, String event, Object eventArg) 
- 
shutdownStreamHandlingvoid shutdownStreamHandling()Called to cleanup any state when the connection is torn down
- 
resetStream
 
-