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

Name Description
ResponseT

Static Methods

<ResponseT>newBuilder()

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

Methods

parse(InputStream httpContent)

public ResponseT parse(InputStream httpContent)

Parse the http body content JSON stream into the MessageFormatT.

Parameter
Name Description
httpContent InputStream
Returns
Type Description
ResponseT

parse(InputStream httpContent, TypeRegistry registry)

public ResponseT parse(InputStream httpContent, TypeRegistry registry)

Parse the http body content JSON stream into the MessageFormatT.

Parameters
Name Description
httpContent InputStream
registry TypeRegistry
Returns
Type Description
ResponseT

parse(Reader httpContent, TypeRegistry registry)

public ResponseT parse(Reader httpContent, TypeRegistry registry)

Parse the http body content JSON reader into the MessageFormatT.

Parameters
Name Description
httpContent Reader
registry TypeRegistry
Returns
Type Description
ResponseT

serialize(ResponseT response)

public String serialize(ResponseT response)
Parameter
Name Description
response ResponseT
Returns
Type Description
String