|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.api.client.http.json.JsonHttpClient
com.google.api.client.googleapis.services.GoogleClient
public class GoogleClient
Google API client.
Nested Class Summary | |
---|---|
static class |
GoogleClient.Builder
Builder for GoogleClient . |
Constructor Summary | |
---|---|
|
GoogleClient(HttpTransport transport,
JsonFactory jsonFactory,
String baseUrl)
Constructor with required parameters. |
protected |
GoogleClient(HttpTransport transport,
JsonHttpRequestInitializer jsonHttpRequestInitializer,
HttpRequestInitializer httpRequestInitializer,
JsonFactory jsonFactory,
String baseUrl,
String applicationName)
Construct the GoogleClient . |
Method Summary | |
---|---|
static GoogleClient.Builder |
builder(HttpTransport transport,
JsonFactory jsonFactory,
GenericUrl baseUrl)
Returns an instance of a new builder. |
protected HttpRequest |
buildHttpRequest(HttpMethod method,
GenericUrl url,
Object body)
Create an HttpRequest suitable for use against this service. |
protected HttpRequest |
buildHttpRequest(HttpMethod method,
String uriTemplate,
JsonHttpRequest jsonHttpRequest)
Deprecated. (scheduled to be removed in 1.8) Use buildHttpRequest(HttpMethod, GenericUrl, Object) |
protected HttpResponse |
execute(HttpMethod method,
String uriTemplate,
Object body,
JsonHttpRequest jsonHttpRequest)
Deprecated. (scheduled to be removed in 1.8) Use executeUnparsed(com.google.api.client.http.HttpMethod, com.google.api.client.http.GenericUrl, java.lang.Object) |
protected HttpResponse |
executeUnparsed(HttpMethod method,
GenericUrl url,
Object body)
|
Methods inherited from class com.google.api.client.http.json.JsonHttpClient |
---|
createParser, createSerializer, getApplicationName, getBaseUrl, getJsonFactory, getJsonHttpParser, getJsonHttpRequestInitializer, getRequestFactory, initialize |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GoogleClient(HttpTransport transport, JsonFactory jsonFactory, String baseUrl)
Use builder(HttpTransport, JsonFactory, GenericUrl)
if you need to specify any of the
optional parameters.
transport
- The transport to use for requestsjsonFactory
- A factory for creating JSON parsers and serializersbaseUrl
- The base URL of the service. Must end with a "/"protected GoogleClient(HttpTransport transport, JsonHttpRequestInitializer jsonHttpRequestInitializer, HttpRequestInitializer httpRequestInitializer, JsonFactory jsonFactory, String baseUrl, String applicationName)
GoogleClient
.
transport
- The transport to use for requestsjsonHttpRequestInitializer
- The initializer to use when creating an
JsonHttpRequest
or null
for nonehttpRequestInitializer
- The initializer to use when creating an HttpRequest
or
null
for nonejsonFactory
- A factory for creating JSON parsers and serializersbaseUrl
- The base URL of the service. Must end with a "/"applicationName
- The application name to be sent in the User-Agent header of requests or
null
for noneMethod Detail |
---|
@Deprecated protected HttpRequest buildHttpRequest(HttpMethod method, String uriTemplate, JsonHttpRequest jsonHttpRequest) throws IOException
buildHttpRequest(HttpMethod, GenericUrl, Object)
HttpRequest
suitable for use against this service.
buildHttpRequest
in class JsonHttpClient
method
- HTTP Method typeuriTemplate
- URI template for the path relative to the base URL. Must not start with a
"/"jsonHttpRequest
- JSON HTTP Request type
HttpRequest
IOException
protected HttpRequest buildHttpRequest(HttpMethod method, GenericUrl url, Object body) throws IOException
HttpRequest
suitable for use against this service.
buildHttpRequest
in class JsonHttpClient
method
- HTTP Method typeurl
- The complete URL of the service where requests should be sent. It includes the base
path along with the URI templatebody
- A POJO that can be serialized into JSON or null
for none
HttpRequest
IOException
public static GoogleClient.Builder builder(HttpTransport transport, JsonFactory jsonFactory, GenericUrl baseUrl)
transport
- The transport to use for requestsjsonFactory
- A factory for creating JSON parsers and serializersbaseUrl
- The base URL of the service. Must end with a "/"@Deprecated protected HttpResponse execute(HttpMethod method, String uriTemplate, Object body, JsonHttpRequest jsonHttpRequest) throws IOException
executeUnparsed(com.google.api.client.http.HttpMethod, com.google.api.client.http.GenericUrl, java.lang.Object)
execute
in class JsonHttpClient
IOException
protected HttpResponse executeUnparsed(HttpMethod method, GenericUrl url, Object body) throws IOException
executeUnparsed
in class JsonHttpClient
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |