Class ApiMessageHttpResponseParser<ResponseT> (2.7.1)

public abstract class ApiMessageHttpResponseParser<ResponseT> implements HttpResponseParser<ResponseT>

Utility class to parse ApiMessages from HTTP responses.

Inheritance

java.lang.Object > ApiMessageHttpResponseParser<ResponseT>

Implements

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

Type Parameter

NameDescription
ResponseT

Constructors

ApiMessageHttpResponseParser()

public ApiMessageHttpResponseParser()

Methods

<ResponseT>newBuilder()

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

getResponseInstance()

public abstract ResponseT getResponseInstance()
Returns
TypeDescription
ResponseT

getResponseMarshaller()

protected abstract Gson getResponseMarshaller()
Returns
TypeDescription
com.google.gson.Gson

parse(InputStream httpResponseBody)

public ResponseT parse(InputStream httpResponseBody)

Parse the http body content JSON stream into the MessageFormatT.

Parameter
NameDescription
httpResponseBodyInputStream
Returns
TypeDescription
ResponseT

parse(InputStream httpResponseBody, TypeRegistry registry)

public ResponseT parse(InputStream httpResponseBody, TypeRegistry registry)

Parse the http body content JSON stream into the MessageFormatT.

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

serialize(ResponseT response)

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