Module io.inverno.mod.grpc.base
Package io.inverno.mod.grpc.base
Interface GrpcInboundResponseTrailersMetadata
- All Superinterfaces:
GrpcInboundMetadata
- All Known Subinterfaces:
GrpcOutboundResponseTrailersMetadata
Represents immutable inbound gRPC response trailers metadata.
This extends the GrpcInboundMetadata to expose response trailers specific information like the gRPC status and message.
An inbound response is received by a client in a client exchange, the trailers metadata are received last and terminates the gRPC exchange.
- Since:
- 1.9
- Author:
- Jeremy Kuhn
-
Method Summary
Modifier and TypeMethodDescriptionReturns the gRPC status.intReturns the gRPC status code.Returns the gRPC status message.Methods inherited from interface io.inverno.mod.grpc.base.GrpcInboundMetadata
contains, contains, containsBinary, containsBinary, get, getAll, getAllBinary, getBinary, getBinaryNames, getNames
-
Method Details
-
getStatus
GrpcStatus getStatus()Returns the gRPC status.
- Returns:
- the response status
- Throws:
IllegalArgumentException- if the status code specified in the metadata is not a known gRPC status
-
getStatusCode
int getStatusCode()Returns the gRPC status code.
- Returns:
- the gRPC status code
-
getStatusMessage
Returns the gRPC status message.
- Returns:
- an optional returning the gRPC status message or an empty optional if none was specified
-