Module io.inverno.mod.grpc.base
Package io.inverno.mod.grpc.base
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 Summary
Modifier and TypeMethodDescriptionadd
(CharSequence name, CharSequence value) Adds a metadata with the specified name and value.<T extends com.google.protobuf.MessageLite>
AaddBinary
(CharSequence name, T value) Adds a binary metadata with the specified name and value.boolean
Determines whether the metadata have been sent to the recipient.remove
(CharSequence... names) Removes the metadata with the specified names.removeBinary
(CharSequence... names) Removes the binary metadata with the specified names.set
(CharSequence name, CharSequence value) Sets the value of the metadata with the specified name.<T extends com.google.protobuf.MessageLite>
AsetBinary
(CharSequence name, T value) Sets a binary metadata with the specified name and value.Methods inherited from interface io.inverno.mod.grpc.base.GrpcInboundMetadata
contains, contains, containsBinary, containsBinary, get, getAll, getAllBinary, getBinary, getBinaryNames, getNames
-
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
Adds a metadata with the specified name and value.
- Parameters:
name
- the metadata namevalue
- the metadata value- Returns:
- the outbound metadata
-
set
Sets the value of the metadata with the specified name.
- Parameters:
name
- the metadata namevalue
- the metadata value- Returns:
- the outbound metadata
-
remove
Removes the metadata with the specified names.
- Parameters:
names
- the names of the metadata to remove- Returns:
- the outbound metadata
-
addBinary
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
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
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
-