-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Motivation: The methods in `GrpcServerBuilder` are often only delegating to the underlying HTTP transport builder. It will be beneficial if the API can be simplified and have only gRPC specific settings. The first step is to deprecate the methods which can be called directly on the underlying `HttpServerBuilder` and to introduce a method for configuring that builder. Modifications: - Introduce a `GrpcServerBuilder.HttpInitializer` interface and a corresponding `GrpcServerBuilder#initialize` method which accepts the initializer for the underlying `HttpServerBuilder` instance, - Deprecate methods which have only served the purpose of delegating to the underlying HTTP transport builder, - Added default implementations for deprecated methods, - Made the builder reconfigurable after first build, - Clarified javadoc for lifecycleObserver overriding by initializer, - Refactor tests to use the new approach to showcase it works. Result: The API of `GrpcServerBuilder` is prepared for removal of the deprecated methods in 0.42 release and the API is more specific, while maintaining the same level of configurability.
- Loading branch information
Dariusz Jedrzejczyk
committed
Oct 13, 2021
1 parent
f249032
commit f8aaa8d
Showing
10 changed files
with
336 additions
and
96 deletions.
There are no files selected for viewing
170 changes: 147 additions & 23 deletions
170
servicetalk-grpc-api/src/main/java/io/servicetalk/grpc/api/GrpcServerBuilder.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.