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

Expose protocol name at `ConnectionContext` API #955

Merged
merged 8 commits into from Mar 7, 2020

Conversation

@idelpivnitskiy
Copy link
Member

idelpivnitskiy commented Mar 3, 2020

Motivation:

Users should have a way to determine which application level
protocol is used by each connection.

Modifications:

  • Introduce a new Protocol interface for transport-api;
  • Add ConnectionContext.protocol() method;
  • Add HttpProtocol interface that extends Protocol for http-api;
  • HttpProtocolVersion implements HttpProtocol interface;
  • Add HttpConnectionContext that returns HttpProtocol for
    #protocol() method;
  • Return HttpConnectionContext everywhere in http-api;
  • Add GrpcProtocol interface that extends Protocol for grpc-api;
  • GrpcServiceContext overrides HttpServiceContextand returnsGrpcProtocolfor#protocol()` method;
  • Add tests to verify new API;

Result:

Users can understand the protocol used by each connection.

Motivation:

Users should have a way to determine which application level
protocol is used by each connection.

Modifications:

- Add `ConnectionContext.protocol()` method;

Result:

Users can understand the protocol used by each connection.
@idelpivnitskiy idelpivnitskiy requested a review from NiteshKant Mar 3, 2020
@idelpivnitskiy idelpivnitskiy requested a review from NiteshKant Mar 5, 2020
Copy link
Member

NiteshKant left a comment

One comment then LGTM

@idelpivnitskiy idelpivnitskiy merged commit 001f579 into apple:master Mar 7, 2020
3 checks passed
3 checks passed
pull request validation (jdk11) Build finished.
Details
pull request validation (jdk8) Build finished.
Details
pull request validation (quality) Build finished.
Details
@idelpivnitskiy idelpivnitskiy deleted the idelpivnitskiy:protocol-version branch Mar 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.