|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.api.client.http.protobuf.ProtoHttpParser
ProtoObjectParser
instead.
@Deprecated public class ProtoHttpParser
Parses protocol buffer HTTP response content into a protocol buffer message.
Implementation is immutable and therefore thread-safe.
Sample usage:
static void setParser(HttpRequest request) {
request.addParser(new ProtoHttpParser());
}
Nested Class Summary | |
---|---|
static class |
ProtoHttpParser.Builder
Deprecated. Builder for ProtoHttpParser . |
Constructor Summary | |
---|---|
|
ProtoHttpParser()
Deprecated. |
protected |
ProtoHttpParser(String contentType)
Deprecated. |
Method Summary | ||
---|---|---|
static ProtoHttpParser.Builder |
builder()
Deprecated. Returns an instance of a new builder. |
|
String |
getContentType()
Deprecated. Returns the content type. |
|
|
parse(HttpResponse response,
Class<T> dataClass)
Deprecated. Parses the given HTTP response into a new instance of the the given data class of key/value pairs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProtoHttpParser()
protected ProtoHttpParser(String contentType)
contentType
- content typeMethod Detail |
---|
public final String getContentType()
HttpParser
getContentType
in interface HttpParser
public <T> T parse(HttpResponse response, Class<T> dataClass) throws IOException
HttpParser
How the parsing is performed is not restricted by this interface, and is instead defined by the
concrete implementation. Implementations should check
HttpResponse.isSuccessStatusCode()
to know whether they are parsing a success or error
response.
parse
in interface HttpParser
IOException
public static ProtoHttpParser.Builder builder()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |