Package io.grpc
Class Metadata.BinaryKey<T>
- java.lang.Object
-
- io.grpc.Metadata.Key<T>
-
- io.grpc.Metadata.BinaryKey<T>
-
- Enclosing class:
- Metadata
private static class Metadata.BinaryKey<T> extends Metadata.Key<T>
-
-
Field Summary
Fields Modifier and Type Field Description private Metadata.BinaryMarshaller<T>marshaller
-
Constructor Summary
Constructors Modifier Constructor Description privateBinaryKey(java.lang.String name, Metadata.BinaryMarshaller<T> marshaller)Keys have a name and a binary marshaller used for serialization.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) TparseBytes(byte[] serialized)Parse a serialized metadata value from bytes.(package private) byte[]toBytes(T value)Serialize a metadata value to bytes.-
Methods inherited from class io.grpc.Metadata.Key
asciiName, equals, getMarshaller, hashCode, name, of, of, of, of, of, originalName, serializesToStreams, toString
-
-
-
-
Field Detail
-
marshaller
private final Metadata.BinaryMarshaller<T> marshaller
-
-
Constructor Detail
-
BinaryKey
private BinaryKey(java.lang.String name, Metadata.BinaryMarshaller<T> marshaller)Keys have a name and a binary marshaller used for serialization.
-
-
Method Detail
-
toBytes
byte[] toBytes(T value)
Description copied from class:Metadata.KeySerialize a metadata value to bytes.- Specified by:
toBytesin classMetadata.Key<T>- Parameters:
value- to serialize- Returns:
- serialized version of value
-
parseBytes
T parseBytes(byte[] serialized)
Description copied from class:Metadata.KeyParse a serialized metadata value from bytes.- Specified by:
parseBytesin classMetadata.Key<T>- Parameters:
serialized- value of metadata to parse- Returns:
- a parsed instance of type T
-
-