Class ApiMessageHttpResponseParser<ResponseT> (2.16.0)
Note: Some or all of the information on this page might not apply
to Trusted Cloud. For a list of services that are available in
Trusted Cloud, see Services available for
Trusted Cloud .
Version 2.16.0keyboard_arrow_down
public abstract class ApiMessageHttpResponseParser<ResponseT> implements HttpResponseParser<ResponseT>
Utility class to parse ApiMessage s from HTTP responses.
Implements
com.google.api.gax.httpjson.HttpResponseParser<ResponseT>
Type Parameter
Name
Description
ResponseT
Static Methods
<ResponseT>newBuilder()
public static ApiMessageHttpResponseParser . Builder<ResponseT> <ResponseT>newBuilder ()
Returns
Type
Description
Builder <ResponseT >
Constructors
ApiMessageHttpResponseParser()
public ApiMessageHttpResponseParser ()
Methods
getResponseInstance()
public abstract ResponseT getResponseInstance ()
Returns
Type
Description
ResponseT
getResponseMarshaller()
protected abstract Gson getResponseMarshaller ()
Returns
Type
Description
com.google.gson.Gson
public ResponseT parse ( InputStream httpResponseBody )
Parse the http body content JSON stream into the MessageFormatT.
Parameter
Returns
Type
Description
ResponseT
public ResponseT parse ( InputStream httpResponseBody , TypeRegistry registry )
Parse the http body content JSON stream into the MessageFormatT.
Parameters
Name
Description
httpResponseBody
InputStream
registry
com.google.protobuf.TypeRegistry
Returns
Type
Description
ResponseT
parse(Reader httpResponseBody, TypeRegistry registry)
public ResponseT parse ( Reader httpResponseBody , TypeRegistry registry )
Parse the http body content JSON reader into the MessageFormatT.
Parameters
Name
Description
httpResponseBody
Reader
registry
com.google.protobuf.TypeRegistry
Returns
Type
Description
ResponseT
serialize(ResponseT response)
public String serialize ( ResponseT response )
Parameter
Name
Description
response
ResponseT
Returns
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-09-30 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-30 UTC."],[],[],null,[]]