I have a working example using the NettyServerBuilder and protobufs that create an endpoint service and provides me with the Java representation of what I want.
I don't need the server/endpoints. I really just want the codec (or whatever marshalls the bytes to the Java object).
The reason is, I have an existing Netty based server, and I would prefer to just plug in a GRPC pipeline handler, and do some work, and send it along the way. So, in other words, I have existing common business logic, but a couple of different interfaces (HTTP, and now GRPC).
Some issues:
1) I don't think I can use the NettyServerBuilder() because it expects a shadowed version of the event loops. In other words, the GRPC project brings in the Netty code and repackages, so many classes can't be used back-and-forth.
Some possibilities:
1) I think it would be possible if I forked the grpc-java: /netty... code. Probably expose the underlying Context/Channel/Pipelines to the generated service stub. Maybe, but also not too trivial.
2) Ultimately, I can just run two servers, and send it over a socket, but I was hoping to not add a hop.
3) Any other ideas ?
Thanks for any thoughts,
-Doug