|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.api.client.googleapis.json.GoogleJsonRpcHttpTransport
public final class GoogleJsonRpcHttpTransport
JSON-RPC 2.0 HTTP transport for RPC requests for Google API's, including both singleton and batched requests.
Warning: this is based on an undocumented experimental Google functionality that may stop working or change in behavior at any time. Beware of this risk if running this in production code.
Field Summary | |
---|---|
String |
accept
Accept header to use for requests. |
String |
contentType
Content type header to use for requests. |
com.google.api.client.json.JsonFactory |
jsonFactory
(REQUIRED) JSON factory to use for building requests. |
com.google.api.client.http.GenericUrl |
rpcServerUrl
RPC server URL. |
com.google.api.client.http.HttpTransport |
transport
(REQUIRED) HTTP transport required for building requests. |
Constructor Summary | |
---|---|
GoogleJsonRpcHttpTransport()
|
Method Summary | |
---|---|
com.google.api.client.http.HttpRequest |
buildPostRequest(com.google.api.client.json.rpc2.JsonRpcRequest request)
Builds a POST HTTP request for the JSON-RPC requests objects specified in the given JSON-RPC request object. |
com.google.api.client.http.HttpRequest |
buildPostRequest(List<com.google.api.client.json.rpc2.JsonRpcRequest> requests)
Builds a POST HTTP request for the JSON-RPC requests objects specified in the given JSON-RPC request objects. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public com.google.api.client.http.GenericUrl rpcServerUrl
public com.google.api.client.http.HttpTransport transport
public com.google.api.client.json.JsonFactory jsonFactory
public String contentType
"application/json-rpc"
.
public String accept
"application/json-rpc"
.
Constructor Detail |
---|
public GoogleJsonRpcHttpTransport()
Method Detail |
---|
public com.google.api.client.http.HttpRequest buildPostRequest(com.google.api.client.json.rpc2.JsonRpcRequest request)
You may use
JsonHttpParser.parserForResponse
(execute
(request))
to get the JsonParser
, and JsonParser.parseAndClose(Class, CustomizeJsonParser)
.
request
- JSON-RPC request object
public com.google.api.client.http.HttpRequest buildPostRequest(List<com.google.api.client.json.rpc2.JsonRpcRequest> requests)
Note that the request will always use batching -- i.e. JSON array of requests -- even if there
is only one request. You may use
JsonHttpParser.parserForResponse
(execute
(requests)) to get
the JsonParser
, and
JsonParser.parseArrayAndClose(Collection, Class, CustomizeJsonParser)
.
requests
- JSON-RPC request objects
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |