public class UnknownStatusDescriptionInterceptor extends Object implements io.grpc.ServerInterceptor
ServerInterceptor
that changes the Status
of responses that have
Status.Code#UNKNOWN
and don't have any Status.getDescription()
but
do have the Status.getCause()
such that the changed Status
is obtained from
the provided map of exception root classes -> statuses
augmented with the following:
cause
is set to original status causedescription
is set to original cause's stack traceConstructor and Description |
---|
UnknownStatusDescriptionInterceptor(Map<Class<? extends Throwable>,io.grpc.Status> throwableRootsStatuses) |
Modifier and Type | Method and Description |
---|---|
<ReqT,RespT> |
interceptCall(io.grpc.ServerCall<ReqT,RespT> call,
io.grpc.Metadata headers,
io.grpc.ServerCallHandler<ReqT,RespT> next) |
Copyright © 2020 Red Hat. All rights reserved.