Package io.grpc
Interface Metadata.TrustedAsciiMarshaller<T>
-
- All Known Subinterfaces:
InternalMetadata.TrustedAsciiMarshaller<T>
- All Known Implementing Classes:
GrpcUtil.AcceptEncodingMarshaller
,Status.StatusCodeMarshaller
,Status.StatusMessageMarshaller
- Enclosing class:
- Metadata
@Immutable static interface Metadata.TrustedAsciiMarshaller<T>
A specialized plain ASCII marshaller. Both input and output are assumed to be valid header ASCII.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
parseAsciiString(byte[] serialized)
Parse a serialized metadata value from an ASCII string.byte[]
toAsciiString(T value)
Serialize a metadata value to a ASCII string that contains only the characters listed in the class comment ofMetadata.AsciiMarshaller
.
-
-
-
Method Detail
-
toAsciiString
byte[] toAsciiString(T value)
Serialize a metadata value to a ASCII string that contains only the characters listed in the class comment ofMetadata.AsciiMarshaller
. Otherwise the output may be considered invalid and discarded by the transport, or the call may fail.- Parameters:
value
- to serialize- Returns:
- serialized version of value, or null if value cannot be transmitted.
-
parseAsciiString
T parseAsciiString(byte[] serialized)
Parse a serialized metadata value from an ASCII string.- Parameters:
serialized
- value of metadata to parse- Returns:
- a parsed instance of type T
-
-