Skip to content

Conversation

@MrMage
Copy link
Collaborator

@MrMage MrMage commented Mar 3, 2019

… , while renaming the existing ServerCallContext class to ServerCallContextBase.

Motivation: As opposed to all three other call types, unary calls are not passed an instance of the previous ServerCallContext class, but rather of the StatusOnlyCallContext protocol. If one wanted to create a method that uses only a call's event loop and request headers but wants to process all four types of calls, that was not possible before. With this change, such a method could simply accept an instance of ServerCallContext, which the call arguments provided to all four methods now conform to.

… a common `ServerCallContext` protocol, while renaming the existing `ServerCallContext` class to `ServerCallContextBase`.

Motivation: As opposed to all three other call types, unary calls are not passed an instance of the previous `ServerCallContext` class, but rather of the `StatusOnlyCallContext` protocol. If one wanted to create a method that uses only a call's event loop and request headers but wants to process all *four* types of calls, that was not possible before. With this change, such a method could simply accept an instance of `ServerCallContext`, which the call arguments provided to all four methods now conform to.
@MrMage MrMage requested a review from rebello95 March 3, 2019 15:47
@MrMage
Copy link
Collaborator Author

MrMage commented Mar 3, 2019

@glbrntt, looks like I can't request a review from you, but please take a look regardless.

@MrMage MrMage merged commit c082197 into master Mar 4, 2019
@MrMage MrMage deleted the server-call-context branch April 4, 2019 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants