Hi,
I have a question regarding how I can access each field of the input
request object in ServerInterceptor. The following is my code:
public <ReqT, RespT> ServerCall.Listener<ReqT>
interceptCall(ServerCall<ReqT, RespT> serverCall,
Metadata metadata,
ServerCallHandler<ReqT, RespT> serverCallHandler) {
ServerCall.Listener<ReqT> listener =
serverCallHandler.startCall(serverCall, metadata);
return new
ForwardingServerCallListener.SimpleForwardingServerCallListener<>(listener)
{
@Override
public void onMessage(ReqT message) {
System.out.println(message.toString());
super.onMessage(message);
}
};
}
After printing it out, the following output appears:
request_config {
field_1: "field_1"
field_2: "field_2"
field_3: "field_3"
}
I didn't find any obvious methods in the source code or examples online on
processing each fields in the message. Does anyone have examples on how to
access each field?
Thanks,
Bill
--
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/bcb78a30-402b-4ea1-bea7-67b3c3912cf5n%40googlegroups.com.