Interface GrpcOutboundRequestMetadata

All Superinterfaces:
GrpcInboundMetadata, GrpcInboundRequestMetadata, GrpcOutboundMetadata<GrpcOutboundRequestMetadata>

public interface GrpcOutboundRequestMetadata extends GrpcInboundRequestMetadata, GrpcOutboundMetadata<GrpcOutboundRequestMetadata>

Represents mutable outbound gRPC request metadata.

This extends the GrpcOutboundMetadata to expose request specific information like accepted message encodings, message encoding, message type and timeout.

An outbound request is sent by a client in a client exchange.

Since:
1.9
Author:
Jeremy Kuhn
  • Method Details

    • acceptMessageEncoding

      GrpcOutboundRequestMetadata acceptMessageEncoding(List<String> messageEncodings)

      Sets the list of message encodings accepted by a client.

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

      GrpcOutboundRequestMetadata messageEncoding(String messageEncoding)

      Sets the encoding of messages sent by a client.

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

      Parameters:
      messageEncoding - a message encoding
      Returns:
      the request metadata
    • messageType

      GrpcOutboundRequestMetadata messageType(String messageType)

      Sets the type of messages sent by a client.

      Parameters:
      messageType - a message type
      Returns:
      the request metadata
    • timeout

      Sets the gRPC timeout.

      Parameters:
      timeout - a timeout
      Returns:
      the request metadata
      Throws:
      IllegalArgumentException - if the specified duration is invalid
      See Also: