GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||
GeezerVison is showing github.com — api: Expose ForwardingServerBuilder for XdsServerBuilder by ejona86 · Pull Request #7633 · grpc/grpc-java Conversation
|
| import javax.annotation.Nullable; | ||
|
|
||
| /** | ||
| * A {@link ServerBuilder} that delegates all its builder method to another builder by default. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
s/all its builder method/all its builder methods/
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| /** | ||
| * This method serves to force sub classes to "hide" this static factory. | ||
| */ | ||
| public static ServerBuilder<?> forPort(int port) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The XdsServerBuilder subclass will only define this as VisibleForTesting to be used by test code. Actual user code is supposed to call forPort(int,ServerCredentials) . However the subclass cannot reduce the visibility from public to package-private. Not that we can do anything in this PR about it...
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Hm, why copy ForwardingServerBuilder and not just make it public? I believe the only reason we made it package-private is because it wasn't used anymore after we reverted NettyServerBuilder to extend AbstractServerImplBuilder. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think this is a good reason to make ForwardingServerBuilder public.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This reduces ABI issues caused by returning the more precise XdsServerBuilder in the API. See grpc#7552.
442f0c9 to
3ee1b17
Compare
|
I didn't make it public since I didn't want to do that in the 11th hour. But I agree it should be mostly fine. Done. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
![]()
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.