public interface Http2StreamHandling
extends org.apache.pekko.macros.LogHelper
Handles HTTP/2 stream states
Accepts FrameEvent
s from the network side and emits ByteHttp2SubStream
s for streams
to be handled by the Pekko HTTP layer.
Mixed into the Http2ServerDemux graph logic.
Modifier and Type | Method and Description |
---|---|
int |
activeStreamCount() |
Http2StreamHandling.Closed$ |
Closed()
Accessor for nested Scala object
|
void |
dispatchSubstream(FrameEvent.ParsedHeadersFrame initialHeaders,
scala.util.Either<org.apache.pekko.util.ByteString,org.apache.pekko.stream.scaladsl.Source<java.lang.Object,java.lang.Object>> data,
scala.collection.immutable.Map<AttributeKey<?>,java.lang.Object> correlationAttributes) |
void |
distributeWindowDeltaToAllStreams(int delta)
Called by multiplexer to distribute changes from INITIAL_WINDOW_SIZE to all streams
|
void |
enqueueOutStream(int streamId) |
IncomingFlowController |
flowController() |
void |
handleOutgoingCreated(Http2SubStream stream)
Called by Http2ServerDemux when a stream comes in from the user-handler
|
void |
handleOutgoingEnded(int streamId) |
void |
handleOutgoingFailed(int streamId,
java.lang.Throwable cause) |
void |
handleStreamEvent(FrameEvent.StreamFrameEvent e)
Called by Http2ServerDemux to let the state machine handle StreamFrameEvents
|
boolean |
hasCapacityToCreateStreams() |
Http2StreamHandling.Idle$ |
Idle()
Accessor for nested Scala object
|
void |
incomingStreamPulled(int streamId)
Entry-point to handle IncomingStreamBuffer.onPull through the state machine
|
boolean |
isServer() |
boolean |
isUpgraded() |
int |
lastStreamId()
The "last peer-initiated stream that was or might be processed on the sending endpoint in this connection"
|
Http2Multiplexer |
multiplexer() |
void |
onAllStreamsClosed()
Called when all streams in StreamHandling buffers are closed and the stage is completing.
|
Http2StreamHandling.OutStream$ |
OutStream()
Accessor for nested Scala object
|
PullFrameResult |
pullNextFrame(int streamId,
int maxSize)
Called by the multiplexer if ready to send a data frame
|
void |
pushGOAWAY(Http2Protocol.ErrorCode errorCode,
java.lang.String debug) |
void |
resetStream(int streamId,
Http2Protocol.ErrorCode errorCode) |
void |
setMaxConcurrentStreams(int newValue) |
Http2CommonSettings |
settings() |
void |
shutdownStreamHandling()
Called to cleanup any state when the connection is torn down
|
Http2StreamHandling.StreamState |
streamFor(int streamId) |
void |
tryPullSubStreams()
Tries to generate demand of SubStreams on the inlet from the user handler.
|
void |
updateAllStates(scala.Function1<Http2StreamHandling.StreamState,Http2StreamHandling.StreamState> handle,
java.lang.String event,
java.lang.Object eventArg) |
void |
updateState(int streamId,
scala.Function1<Http2StreamHandling.StreamState,Http2StreamHandling.StreamState> handle,
java.lang.String event,
java.lang.Object eventArg) |
<R> R |
updateStateAndReturn(int streamId,
scala.Function1<Http2StreamHandling.StreamState,scala.Tuple2<Http2StreamHandling.StreamState,R>> handle,
java.lang.String event,
java.lang.Object eventArg) |
scala.Option<HttpEntity.ChunkStreamPart> |
wrapTrailingHeaders(FrameEvent.ParsedHeadersFrame headers) |
Http2StreamHandling.Idle$ Idle()
Http2StreamHandling.Closed$ Closed()
Http2StreamHandling.OutStream$ OutStream()
boolean isServer()
Http2Multiplexer multiplexer()
Http2CommonSettings settings()
void pushGOAWAY(Http2Protocol.ErrorCode errorCode, java.lang.String debug)
void dispatchSubstream(FrameEvent.ParsedHeadersFrame initialHeaders, scala.util.Either<org.apache.pekko.util.ByteString,org.apache.pekko.stream.scaladsl.Source<java.lang.Object,java.lang.Object>> data, scala.collection.immutable.Map<AttributeKey<?>,java.lang.Object> correlationAttributes)
boolean isUpgraded()
scala.Option<HttpEntity.ChunkStreamPart> wrapTrailingHeaders(FrameEvent.ParsedHeadersFrame headers)
IncomingFlowController flowController()
void tryPullSubStreams()
int lastStreamId()
http://httpwg.org/specs/rfc7540.html#rfc.section.6.8
void setMaxConcurrentStreams(int newValue)
boolean hasCapacityToCreateStreams()
void onAllStreamsClosed()
Http2StreamHandling.StreamState streamFor(int streamId)
int activeStreamCount()
void handleStreamEvent(FrameEvent.StreamFrameEvent e)
void handleOutgoingCreated(Http2SubStream stream)
void handleOutgoingEnded(int streamId)
void handleOutgoingFailed(int streamId, java.lang.Throwable cause)
void distributeWindowDeltaToAllStreams(int delta)
PullFrameResult pullNextFrame(int streamId, int maxSize)
void incomingStreamPulled(int streamId)
void updateAllStates(scala.Function1<Http2StreamHandling.StreamState,Http2StreamHandling.StreamState> handle, java.lang.String event, java.lang.Object eventArg)
void updateState(int streamId, scala.Function1<Http2StreamHandling.StreamState,Http2StreamHandling.StreamState> handle, java.lang.String event, java.lang.Object eventArg)
void enqueueOutStream(int streamId)
<R> R updateStateAndReturn(int streamId, scala.Function1<Http2StreamHandling.StreamState,scala.Tuple2<Http2StreamHandling.StreamState,R>> handle, java.lang.String event, java.lang.Object eventArg)
void shutdownStreamHandling()
void resetStream(int streamId, Http2Protocol.ErrorCode errorCode)