Class ProtoMessageResponseParser<ResponseT> (2.9.0)

public class ProtoMessageResponseParser<ResponseT> implements HttpResponseParser<ResponseT>

The implementation of HttpResponseParser which works with protobuf messages.

Inheritance

java.lang.Object > ProtoMessageResponseParser<ResponseT>

Implements

com.google.api.gax.httpjson.HttpResponseParser<ResponseT>

Type Parameter

NameDescription
ResponseT

Methods

<RequestT>newBuilder()

public static ProtoMessageResponseParser.Builder<RequestT> <RequestT>newBuilder()
Returns
TypeDescription
Builder<RequestT>

parse(InputStream httpContent)

public ResponseT parse(InputStream httpContent)

Parse the http body content JSON stream into the MessageFormatT.

Parameter
NameDescription
httpContentInputStream
Returns
TypeDescription
ResponseT

parse(InputStream httpContent, TypeRegistry registry)

public ResponseT parse(InputStream httpContent, TypeRegistry registry)

Parse the http body content JSON stream into the MessageFormatT.

Parameters
NameDescription
httpContentInputStream
registrycom.google.protobuf.TypeRegistry
Returns
TypeDescription
ResponseT

serialize(ResponseT response)

public String serialize(ResponseT response)
Parameter
NameDescription
responseResponseT
Returns
TypeDescription
String