Class ProtoMessageResponseParser<ResponseT> (2.11.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

Static Methods

<ResponseT>newBuilder()

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

Methods

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

parse(Reader httpContent, TypeRegistry registry)

public ResponseT parse(Reader httpContent, TypeRegistry registry)

Parse the http body content JSON reader into the MessageFormatT.

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

serialize(ResponseT response)

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