gRPC Java - Listening for successful calls on server
24 Репутация автора
I am looking for a way to capture when a call is completed on the server and no errors were thrown.
I understand that
SimpleForwardingServerCallListener exists, however,
onComplete is called when an exception is thrown.
My use case is for transaction management.Автор: javajaba Источник Размещён: 08.11.2017 11:41
474 Репутация автора
Yes, it currently only triggers
onComplete(). There is a bug filed for that. If it's fixed, you can probably get
For now, you can wrap the
SimpleForwardingServerCall in your
ServerInterceptor, and override
close(). If the RPC ends successfully,
OK will be passed to