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,Mono<? extends 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,Mono<? extends E>>

Represents a gRPC client exchange between a client and a server.

A client gRPC exchange is obtained by converting an HTTP client exchange with the GrpcClient 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 GrpcRequest and GrpcResponse exposed by each type of exchange reflect their specific communication form. For instance, a unary exchange shall only provide single request and response messages and one response message whereas a bidirectional streaming exchange shall provide request and response message publishers.

As for an client HTTP Exchange, the actual gRPC request is only sent when the exchange's response message publisher is subscribed.

The client exchange terminates when the response message publisher terminates, gRPC metadata are then received by the client with final GrpcStatus.

Since:
1.9
Author:
Jeremy Kuhn