@ExperimentalApi(value="https://github.com/grpc/grpc-java/issues/2189") public final class TransmitStatusRuntimeExceptionInterceptor extends Object implements ServerInterceptor
StatusRuntimeException
and handles
them by closing the ServerCall
, and transmitting the exception's status and metadata
to the client.
Without this interceptor, gRPC will strip all details and close the ServerCall
with
a generic Status.UNKNOWN
code.
Security warning: the Status
and Metadata
may contain sensitive server-side
state information, and generally should not be sent to clients. Only install this interceptor
if all clients are trusted.
Modifier and Type | Method and Description |
---|---|
static ServerInterceptor |
instance() |
<ReqT,RespT> |
interceptCall(ServerCall<ReqT,RespT> call,
Metadata headers,
ServerCallHandler<ReqT,RespT> next) |
public static ServerInterceptor instance()
public <ReqT,RespT> ServerCall.Listener<ReqT> interceptCall(ServerCall<ReqT,RespT> call, Metadata headers, ServerCallHandler<ReqT,RespT> next)
interceptCall
in interface ServerInterceptor
Copyright © 2019. All rights reserved.