Package com.linecorp.armeria.common.grpc
Interface GoogleGrpcStatusFunction
- All Superinterfaces:
GrpcStatusFunction
Deprecated.
A
GrpcStatusFunction
that provides a way to include details of a status into a Metadata
.
You can implement a mapping function to convert Throwable
into a Status
which is stored in the `grpc-status-details-bin` key in the Metadata
.
If a given Throwable
is an instance of either StatusRuntimeException
or
StatusException
, the Status
retrieved from the exception is
returned with higher priority.-
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable io.grpc.Status
apply
(RequestContext ctx, Throwable throwable, io.grpc.Metadata metadata) Deprecated.@Nullable com.google.rpc.Status
applyStatusProto
(RequestContext ctx, Throwable throwable, io.grpc.Metadata metadata) Deprecated.
-
Method Details
-
apply
@Nullable default @Nullable io.grpc.Status apply(RequestContext ctx, Throwable throwable, io.grpc.Metadata metadata) Deprecated.Description copied from interface:GrpcStatusFunction
Maps the specifiedThrowable
to a gRPCStatus
, and mutates the specifiedMetadata
. Ifnull
is returned, the built-in mapping rule is used by default.- Specified by:
apply
in interfaceGrpcStatusFunction
-
applyStatusProto
@Nullable com.google.rpc.Status applyStatusProto(RequestContext ctx, Throwable throwable, io.grpc.Metadata metadata) Deprecated.Maps the specifiedThrowable
to aStatus
, and mutates the specifiedMetadata
. The `grpc-status-details-bin` key is ignored since it will be overwritten byapply(RequestContext, Throwable, Metadata)
. Ifnull
is returned, the built-in mapping rule is used by default.
-
GoogleGrpcExceptionHandlerFunction
instead.