Module io.inverno.mod.grpc.server
Package io.inverno.mod.grpc.server
Interface GrpcExchange<A extends ExchangeContext,B extends com.google.protobuf.Message,C extends com.google.protobuf.Message,D extends GrpcRequest<B>,E extends GrpcResponse<C>>
- Type Parameters:
A
- The exchange context typeB
- The request message typeC
- The response message typeD
- the request typeE
- the response type
- All Superinterfaces:
GrpcBaseExchange<A,
D, E>
- All Known Subinterfaces:
GrpcExchange.BidirectionalStreaming<A,
,B, C> GrpcExchange.ClientStreaming<A,
,B, C> GrpcExchange.ServerStreaming<A,
,B, C> GrpcExchange.Unary<A,
B, C>
public interface GrpcExchange<A extends ExchangeContext,B extends com.google.protobuf.Message,C extends com.google.protobuf.Message,D extends GrpcRequest<B>,E extends GrpcResponse<C>>
extends GrpcBaseExchange<A,D,E>
Represents a gRPC server exchange between a client and a server.
A server gRPC exchange is created in a specific ExchangeHandler
provided by the GrpcServer
which basically converts an HTTP server exchange into one of
GrpcExchange.Unary
, GrpcExchange.ClientStreaming
, GrpcExchange.ServerStreaming
or GrpcExchange.BidirectionalStreaming
exchange which reflect the four kinds of
service method defined by gRPC core concepts. The exchange handler then delegates the processing of the exchange to the
GrpcExchangeHandler
which was initialy provided to the GrpcServer
.
The server exchange terminates when the response message publisher terminates, gRPC metadata are then sent to the client with final GrpcStatus
.
- Since:
- 1.9
- Author:
- Jeremy Kuhn
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
GrpcExchange.BidirectionalStreaming<A extends ExchangeContext,
B extends com.google.protobuf.Message, C extends com.google.protobuf.Message> Represents a bidirectional streaming (stream/stream) server gRPC exchange.static interface
GrpcExchange.ClientStreaming<A extends ExchangeContext,
B extends com.google.protobuf.Message, C extends com.google.protobuf.Message> Represents a client streaming (stream/response) server gRPC exchange.static interface
GrpcExchange.ServerStreaming<A extends ExchangeContext,
B extends com.google.protobuf.Message, C extends com.google.protobuf.Message> Represents a server streaming (request/stream) server gRPC exchange.static interface
GrpcExchange.Unary<A extends ExchangeContext,
B extends com.google.protobuf.Message, C extends com.google.protobuf.Message> Represents a unary (request/response) server gRPC exchange. -
Method Summary
Methods inherited from interface io.inverno.mod.grpc.base.GrpcBaseExchange
cancel, context, getCancelCause, request, response