Module io.inverno.mod.grpc.server
Package io.inverno.mod.grpc.server
Interface GrpcResponse.Unary<A extends com.google.protobuf.Message>
- Type Parameters:
A
- The response message type
- All Superinterfaces:
GrpcBaseResponse
,GrpcResponse<A>
- Enclosing interface:
GrpcResponse<A extends com.google.protobuf.Message>
public static interface GrpcResponse.Unary<A extends com.google.protobuf.Message>
extends GrpcResponse<A>
Represents a unary (single message) response.
- Since:
- 1.9
- Author:
- Jeremy Kuhn
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.inverno.mod.grpc.server.GrpcResponse
GrpcResponse.Streaming<A extends com.google.protobuf.Message>, GrpcResponse.Unary<A extends com.google.protobuf.Message>
-
Method Summary
Modifier and TypeMethodDescriptionmetadata
(Consumer<GrpcOutboundResponseMetadata> metadataConfigurer) Configures the gRPC response metadata to send in the response.trailersMetadata
(Consumer<GrpcOutboundResponseTrailersMetadata> metadataConfigurer) Configures the gRPC response trailers metadata to send in the response.default void
Sets the response message.void
Sets the response message.Methods inherited from interface io.inverno.mod.grpc.base.GrpcBaseResponse
metadata, trailersMetadata
-
Method Details
-
metadata
GrpcResponse.Unary<A> metadata(Consumer<GrpcOutboundResponseMetadata> metadataConfigurer) throws IllegalStateException Description copied from interface:GrpcResponse
Configures the gRPC response metadata to send in the response.
- Specified by:
metadata
in interfaceGrpcResponse<A extends com.google.protobuf.Message>
- Parameters:
metadataConfigurer
- an outbound response metadata configurer- Returns:
- the response
- Throws:
IllegalStateException
- if the response has already been sent to the client
-
trailersMetadata
GrpcResponse.Unary<A> trailersMetadata(Consumer<GrpcOutboundResponseTrailersMetadata> metadataConfigurer) throws IllegalStateException Description copied from interface:GrpcResponse
Configures the gRPC response trailers metadata to send in the response.
- Specified by:
trailersMetadata
in interfaceGrpcResponse<A extends com.google.protobuf.Message>
- Parameters:
metadataConfigurer
- an outbound response trailers metadata configurer- Returns:
- the response
- Throws:
IllegalStateException
- if the response has already been sent to the endpoint
-
value
Sets the response message.
- Parameters:
value
- a response message
-
value
Sets the response message.
- Parameters:
value
- a response message mono
-