I think the only real additional information is from reading the 
implementation. Its fairly simple: in _server.py, the _ServerState object 
holds on to a list of handlers. When a request comes in, 
_find_method_handler is called, which calls the GenericRpcHandler.service() 
method for each of the handlers in order, until one of them returns a 
value. It then uses that method handler to handle the request.

That said: I'm not sure why you might want to mess with this, since if you 
are using generated protocol buffer stubs, it should handle this for you. 
The reason I've dug through this is we have a fairly silly unit test to 
make sure our application has registered for the correct RPCs after it is 
initialized, since we had a bug where some but not all the handlers were 
registered after refactoring some code.

Hope that helps,

Evan



On Thursday, September 14, 2017 at 4:22:27 AM UTC-4, Amit Saha wrote:
>
> Hello,
>
> https://grpc.io/grpc/python/grpc.html#grpc.server mentions the handlers 
> kwarg to be "An optional list of GenericRpcHandlers used for executing 
> RPCs.". 
>
> Is there more information on this?
>
> Thanks,
> Amit.
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/5e79d869-28ef-4fc8-826a-feeece08fa0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to