public class ProtoUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T extends Message> |
keyForProto(T instance)
Produce a metadata key for a generated protobuf type.
|
static <T extends Message> |
marshaller(T defaultInstance)
Create a
Marshaller for protos of the same type as defaultInstance. |
static <T extends Message> |
metadataMarshaller(T instance)
Produce a metadata marshaller for a protobuf type.
|
public static <T extends Message> io.grpc.MethodDescriptor.Marshaller<T> marshaller(T defaultInstance)
Marshaller for protos of the same type as defaultInstance.public static <T extends Message> io.grpc.Metadata.Key<T> keyForProto(T instance)
@ExperimentalApi(value="https://github.com/grpc/grpc-java/issues/4477") public static <T extends Message> io.grpc.Metadata.BinaryMarshaller<T> metadataMarshaller(T instance)