Interface GrpcOutboundMetadata<A extends GrpcOutboundMetadata<A>>

Type Parameters:
A - the gRPC outbound metadata type
All Superinterfaces:
GrpcInboundMetadata
All Known Subinterfaces:
GrpcOutboundRequestMetadata, GrpcOutboundResponseMetadata, GrpcOutboundResponseTrailersMetadata

public interface GrpcOutboundMetadata<A extends GrpcOutboundMetadata<A>> extends GrpcInboundMetadata

Represents mutable outbound gRPC metadata.

Since:
1.9
Author:
Jeremy Kuhn
  • Method Details

    • isWritten

      boolean isWritten()

      Determines whether the metadata have been sent to the recipient.

      Returns:
      true if the metadata have been sent, false otherwise
    • add

      A add(CharSequence name, CharSequence value)

      Adds a metadata with the specified name and value.

      Parameters:
      name - the metadata name
      value - the metadata value
      Returns:
      the outbound metadata
    • set

      A set(CharSequence name, CharSequence value)

      Sets the value of the metadata with the specified name.

      Parameters:
      name - the metadata name
      value - the metadata value
      Returns:
      the outbound metadata
    • remove

      A remove(CharSequence... names)

      Removes the metadata with the specified names.

      Parameters:
      names - the names of the metadata to remove
      Returns:
      the outbound metadata
    • addBinary

      <T extends com.google.protobuf.MessageLite> A addBinary(CharSequence name, T value)

      Adds a binary metadata with the specified name and value.

      The the binary name suffix -bin will be automatically added. The metadata value will be serialized in binary and encoded in a base64 string.

      Type Parameters:
      T - the binary metadata message type
      Parameters:
      name - the binary metadata name without the binary name suffix -bin
      value - the binary metadata value
      Returns:
      the outbound metadata
    • setBinary

      <T extends com.google.protobuf.MessageLite> A setBinary(CharSequence name, T value)

      Sets a binary metadata with the specified name and value.

      The the binary name suffix -bin will be automatically added. The metadata value will be serialized in binary and encoded in a base64 string.

      Type Parameters:
      T - the binary metadata message type
      Parameters:
      name - the binary metadata name without the binary name suffix -bin
      value - the binary metadata value
      Returns:
      the outbound metadata
    • removeBinary

      A removeBinary(CharSequence... names)

      Removes the binary metadata with the specified names.

      Parameters:
      names - the names of the binary metadata to remove without the binary name suffix -bin
      Returns:
      the outbound metadata