Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Http2 incoming-side stream state machine #1064

Merged
merged 3 commits into from
Apr 27, 2017

Conversation

jrudolph
Copy link
Member

@jrudolph jrudolph commented Apr 27, 2017

It's now in its own file and handle StreamFrameEvents depending on the state of a stream.

Refs #1053.

@akka-ci akka-ci added validating PR that is currently being validated by Jenkins tested PR that was successfully built and tested by Jenkins and removed validating PR that is currently being validated by Jenkins labels Apr 27, 2017
@akka-ci
Copy link

akka-ci commented Apr 27, 2017

Test PASSed.

state: StreamState,
outlet: Option[BufferedOutlet[ByteString]]
)
override protected def logSource: Class[_] = classOf[Http2ServerDemux]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -81,14 +78,10 @@ class Http2ServerDemux extends GraphStage[BidiShape[Http2SubStream, FrameEvent,
BidiShape(substreamIn, frameOut, frameIn, substreamOut)

def createLogic(inheritedAttributes: Attributes): GraphStageLogic =
new GraphStageLogic(shape) with GenericOutletSupport with Http2MultiplexerSupport with StageLogging {
new GraphStageLogic(shape) with Http2MultiplexerSupport with Http2StreamHandling with GenericOutletSupport with StageLogging {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good, I like these kinds of splitting up with traits 👍

case object Closed extends IncomingStreamState {
def handle(event: StreamFrameEvent): IncomingStreamState = receivedUnexpectedFrame(event)
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nicely modeled states 👍

Copy link
Member

@ktoso ktoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice refactor, happy to merge this so we can put other work on top of it - WDYT?

@jrudolph jrudolph merged commit 0470aeb into akka:master Apr 27, 2017
@jrudolph jrudolph deleted the jr/w/http2-revamp-stream-state-machine branch April 27, 2017 16:10
@jrudolph jrudolph mentioned this pull request Apr 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tested PR that was successfully built and tested by Jenkins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants