Repository navigation
Conversation
There was a problem hiding this comment.
It seems odd to have a class named OutboundState maintaining control to the Framer. I don't have a better idea what to call it, just my opinion.
There was a problem hiding this comment.
In writing tests for AbstractStream, I found it was pretty annoying to not be able to provide a framer for testing purposes. In the spirit of passing in dependencies, perhaps you can make a constructor that allows passing one in?
There was a problem hiding this comment.
Yep I share your pain. I was originally calling it OutboundContext, but was worried it might cause confusion with the context API. I'm definitely open to alternatives.
|
Overall I like the direction. I would like to see how this fits into AbstractStream though, since I suspect that will be tricky to do cleanly. |
|
@carl-mastrangelo @ejona86 PTAL ... renamed the class to |
The stream class structure has become a bit complicated and hard to understand. Much of this is due to the fact that we have so many special cases for client/server, okhttp/netty, etc. I think that we can begin to simplify the code a bit by pulling out the core logic that compose the inbound and outbound state of the streams into specialized classes. This PR is a first-cut at what this might look like.
There was a problem hiding this comment.
Could you add some more interface comments here? Stuff like can this throw, what thread this can be called from, that kinda stuff.
|
Since this is a refactor PR, I figured I would add in some other comments. |
9daf0b8 to
d12d377
Compare
|
@ejona86 any thoughts on this? |
|
I'm okay with something like this, but this in particular seems a bit strange to me. Sender looks like AbstractStream to me. I would have expected the opposite, where everything currently in Sender is AbstractStream and everything else in AbstractStream moved elsewhere. Maybe it will be more clear when hooked up. It's still good that inbound and outbound is split, so I could be okay with this change. |
|
We went with #1656 for splitting outbound/inbound state. |
|
Thank you for your pull request. Before we can look at your contribution, we need to ensure all contributors are covered by a Contributor License Agreement. After the following items are addressed, please respond with a new comment here, and the automated system will re-verify.
Regards, |
The stream class structure has become a bit complicated and hard to understand. Much of this is due to the fact that we have so many special cases for client/server, okhttp/netty, etc.
I think that we can begin to simplify the code a bit by pulling out the core logic that compose the inbound and outbound state of the streams into specialized classes. This PR is a first-cut at what this might look like.