MetadataBuilder

org.apache.pekko.grpc.javadsl.MetadataBuilder
See theMetadataBuilder companion object
@ApiMayChange

This class provides an interface for constructing immutable Metadata instances.

Attributes

Companion
object
Source
MetadataBuilder.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def addBinary(key: String, value: ByteString): MetadataBuilder

Adds a binary entry. The key must end in the "-bin" binary suffix.

Adds a binary entry. The key must end in the "-bin" binary suffix.

Value parameters

key

The entry key.

value

The entry value.

Attributes

Returns

The updated builder.

Source
MetadataBuilder.scala
def addText(key: String, value: String): MetadataBuilder

Adds a string entry. The key must not end in the "-bin" binary suffix.

Adds a string entry. The key must not end in the "-bin" binary suffix.

Value parameters

key

The entry key.

value

The entry value.

Attributes

Returns

The updated builder.

Source
MetadataBuilder.scala
def build(): Metadata

Builds the immutable metadata instance.

Builds the immutable metadata instance.

Attributes

Returns

The instance.

Source
MetadataBuilder.scala