Interface GrpcOutboundResponseMetadata

All Superinterfaces:
GrpcInboundMetadata, GrpcInboundResponseMetadata, GrpcOutboundMetadata<GrpcOutboundResponseMetadata>

public interface GrpcOutboundResponseMetadata extends GrpcInboundResponseMetadata, GrpcOutboundMetadata<GrpcOutboundResponseMetadata>

Represents mutable outbound gRPC response metadata.

This extends the GrpcOutboundMetadata to expose response specific information like accepted message encodings or message encoding.

An outbound response is sent by a server in a server exchange.

Since:
1.9
Author:
Jeremy Kuhn
  • Method Details

    • acceptMessageEncoding

      GrpcOutboundResponseMetadata acceptMessageEncoding(List<String> messageEncodings)

      Sets the list of message encodings accepted by a server.

      Parameters:
      messageEncodings - a list of message encodings
      Returns:
      the response metadata
    • messageEncoding

      GrpcOutboundResponseMetadata messageEncoding(String messageEncoding)

      Sets the encoding of messages sent by a server.

      Note that no error is reported here if an unsupported encoding is specified, the exchange will fail eventually when the response message publisher is subscribed to actually sent messages to the client.

      Parameters:
      messageEncoding - a message encoding
      Returns:
      the response metadata