You can also override sendMessage() on the forwarding ServerCall, save the 
information you need from the response, and use it in the overridden 
close().

On Monday, August 5, 2019 at 7:52:42 AM UTC-7, [email protected] wrote:
>
> Hi all,
>
> I am trying to set some metadata after the rpc server call has been 
> processed. The plan was to use server interceptor and override `close` 
> method. 
>
> Something like this: 
> https://github.com/dconnelly/grpc-error-example/blob/master/src/main/java/example/Errors.java#L38
>  
>
> But the metadata value depends on the response. So I need some way to pass 
> data from rpc server call to server interceptor. 
>
>
> In  Golang, the metadata can be set easily in the rpc call 
> `grpc.SetTrailer` after processing but in java there is no way to do it  in 
> rpc call. So I am trying to use server interceptor for the same.
>
> Can someone help?
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/6d0fb630-c76d-440e-9f3a-57afbf3c08bf%40googlegroups.com.

Reply via email to