-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Description
What did you do?
Add interceptor(s) to ProtoReflectionService
.
What did you expect to see?
ProtoReflectionService
works with interceptor(s).
What did you see instead?
Got a NullPointerException or compilation error.
Problem
I ask a question on Gitter.
https://gitter.im/grpc/grpc?at=59b9090bcfeed2eb65033bad
and I have got a reply from @e.jona86.
https://gitter.im/grpc/grpc?at=59b9a7f9c101bc4e3ac3404a
I think it is not easy to fix. So I report an issue.
ProtoReflectionService
needs a reference to Server
via notifyOnBuild
but it could not, because an intercepted service is an instance of ServerServiceDefinition
.
I think it is consisting some problems (may not a bug or may not a problem) as below.
ServerInterceptors#intercept
binds a service and returnsServerServiceDefinition
.ServerBuilder#addService
doesn't addServerServiceDefinition
tonotifyOnBuildList
.ServerServiceDefinition
doesn't implementInternalNotifyOnBuild
.
Therefore, I could not add interceptor(s) to ProtoReflectionService
.