Will the following code work?
Metadata trailers = new Metadata();
call.close(Status.UNAUTHENTICATED, trailers);
return new ServerCall.Listener<ReqT>() {};
Also, do I need to put anything in trailers or is it just to provide
additional information to the caller?
thanks,
Eugene
On Saturday, January 7, 2017 at 1:03:18 PM UTC-8, Josh Humphries wrote:
>
> In that case, you'd return a dummy (no op) listener and immediately call
> "serverCall.close(errorStatus, optionalTrailers)" to abort the operation.
>
> ----
>
> Josh Humphries
>
> FullStory <https://www.fullstory.com/> | Atlanta, GA
>
> Software Engineer
>
> [email protected] <javascript:>
>
> On Sat, Jan 7, 2017 at 3:27 PM, Eugene Strulyov <[email protected]
> <javascript:>> wrote:
>
>> What is the proper way to abort a call in grpc-java ServerInterceptor?
>> interceptCall() returns
>>
>> ServerCall.Listener() and the javadoc says it must not be null. The only
>> examples I found return next.startCall().
>>
>>
>> thanks,
>>
>>
>> Eugene
>>
>>
>> --
>> 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] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> 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/51ba9e02-c7b7-447c-8282-61dc9981e7d6%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/grpc-io/51ba9e02-c7b7-447c-8282-61dc9981e7d6%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
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/d50f11b7-d6c6-426a-9159-ff35453f4c59%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.