public abstract static class Metadata.Key<T> extends Object
Only the following ASCII characters are allowed in the names of keys:
a-z
and A-Z
0-9
-
_
Note this has to be the subset of valid HTTP/2 token characters as defined in RFC7230 Section 3.2.6
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
hashCode() |
String |
name() |
static <T> Metadata.Key<T> |
of(String name,
Metadata.AsciiMarshaller<T> marshaller)
Creates a key for an ASCII header.
|
static <T> Metadata.Key<T> |
of(String name,
Metadata.BinaryMarshaller<T> marshaller)
Creates a key for a binary header.
|
String |
toString() |
public static <T> Metadata.Key<T> of(String name, Metadata.BinaryMarshaller<T> marshaller)
name
- Must contain only the valid key characters as defined in the class comment. Must
end with Metadata.BINARY_HEADER_SUFFIX
.public static <T> Metadata.Key<T> of(String name, Metadata.AsciiMarshaller<T> marshaller)
name
- Must contain only the valid key characters as defined in the class comment. Must
not end with Metadata.BINARY_HEADER_SUFFIX
public String name()