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 type
B - The request message type
C - The response message type
D - the request type
E - 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