Package brave.grpc
Class GrpcClientResponse
- java.lang.Object
-
- brave.Response
-
- brave.rpc.RpcResponse
-
- brave.rpc.RpcClientResponse
-
- brave.grpc.GrpcClientResponse
-
- All Implemented Interfaces:
GrpcResponse
public final class GrpcClientResponse extends RpcClientResponse implements GrpcResponse
Allows access gRPC specific aspects of a client response for parsing.- Since:
- 5.12
- See Also:
GrpcClientRequest,for a parsing example
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Throwableerror()ReturnsStatus.getCause()StringerrorCode()io.grpc.Metadataheaders()Returns a copy of headers passed toClientCall.Listener.onHeaders(Metadata).GrpcClientRequestrequest()io.grpc.Statusstatus()Returns the status passed toClientCall.Listener.onClose(Status, Metadata).io.grpc.Metadatatrailers()Returns the trailers passed toClientCall.Listener.onClose(Status, Metadata).io.grpc.Statusunwrap()Returns thestatus()-
Methods inherited from class brave.rpc.RpcClientResponse
parseRemoteIpAndPort, spanKind
-
Methods inherited from class brave.rpc.RpcResponse
finishTimestamp
-
-
-
-
Method Detail
-
request
public GrpcClientRequest request()
- Overrides:
requestin classRpcResponse
-
error
@Nullable public Throwable error()
ReturnsStatus.getCause()
-
errorCode
@Nullable public String errorCode()
- Specified by:
errorCodein classRpcResponse
-
headers
public io.grpc.Metadata headers()
Returns a copy of headers passed toClientCall.Listener.onHeaders(Metadata).- Specified by:
headersin interfaceGrpcResponse- Since:
- 5.12
-
status
public io.grpc.Status status()
Returns the status passed toClientCall.Listener.onClose(Status, Metadata).- Specified by:
statusin interfaceGrpcResponse- Since:
- 5.12
-
trailers
public io.grpc.Metadata trailers()
Returns the trailers passed toClientCall.Listener.onClose(Status, Metadata).- Specified by:
trailersin interfaceGrpcResponse- Since:
- 5.12
-
-