Package io.grpc
Class Status.StatusCodeMarshaller
- java.lang.Object
-
- io.grpc.Status.StatusCodeMarshaller
-
- All Implemented Interfaces:
Metadata.TrustedAsciiMarshaller<Status>
- Enclosing class:
- Status
private static final class Status.StatusCodeMarshaller extends java.lang.Object implements Metadata.TrustedAsciiMarshaller<Status>
-
-
Constructor Summary
Constructors Modifier Constructor Description private
StatusCodeMarshaller()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Status
parseAsciiString(byte[] serialized)
Parse a serialized metadata value from an ASCII string.byte[]
toAsciiString(Status status)
Serialize a metadata value to a ASCII string that contains only the characters listed in the class comment ofMetadata.AsciiMarshaller
.
-
-
-
Method Detail
-
toAsciiString
public byte[] toAsciiString(Status status)
Description copied from interface:Metadata.TrustedAsciiMarshaller
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.- Specified by:
toAsciiString
in interfaceMetadata.TrustedAsciiMarshaller<Status>
- Parameters:
status
- to serialize- Returns:
- serialized version of value, or null if value cannot be transmitted.
-
parseAsciiString
public Status parseAsciiString(byte[] serialized)
Description copied from interface:Metadata.TrustedAsciiMarshaller
Parse a serialized metadata value from an ASCII string.- Specified by:
parseAsciiString
in interfaceMetadata.TrustedAsciiMarshaller<Status>
- Parameters:
serialized
- value of metadata to parse- Returns:
- a parsed instance of type T
-
-