Module io.inverno.mod.grpc.server
Package io.inverno.mod.grpc.server
Interface GrpcResponse.Streaming<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.Streaming<A extends com.google.protobuf.Message>
extends GrpcResponse<A>
Represents a streaming (stream of messages) 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.<T extends A>
voidSets the response message publisher.trailersMetadata
(Consumer<GrpcOutboundResponseTrailersMetadata> metadataConfigurer) Configures the gRPC response trailers metadata to send in the response.Methods inherited from interface io.inverno.mod.grpc.base.GrpcBaseResponse
metadata, trailersMetadata
-
Method Details
-
metadata
GrpcResponse.Streaming<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.Streaming<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
-
stream
Sets the response message publisher.
- Type Parameters:
T
- the response message type- Parameters:
value
- the message publisher- Throws:
IllegalStateException
- if messages were already sent to the client
-