|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.api.client.http.HttpTransport
com.google.api.client.http.apache.ApacheHttpTransport
public final class ApacheHttpTransport
Thread-safe HTTP transport based on the Apache HTTP Client library.
Implementation is thread-safe, as long as any parameter modification to the
Apache HTTP Client
is only done at initialization time. For maximum
efficiency, applications should use a single globally-shared instance of the HTTP transport.
Default settings:
ThreadSafeClientConnManager
.ConnManagerParams.setTimeout(org.apache.http.params.HttpParams, long)
,
HttpConnectionParams.setConnectionTimeout(org.apache.http.params.HttpParams, int)
, and HttpConnectionParams.setSoTimeout(org.apache.http.params.HttpParams, int)
.
HttpConnectionParams.setSocketBufferSize(org.apache.http.params.HttpParams, int)
.
These parameters may be overridden by setting the values on the httpClient
.
getParams()
. Please read the Apache HTTP
Client connection management tutorial for more complex configuration questions, such as how
to set up an HTTP proxy.
Field Summary | |
---|---|
org.apache.http.client.HttpClient |
httpClient
Deprecated. (scheduled to be made private in 1.6) Use getHttpClient() |
Constructor Summary | |
---|---|
ApacheHttpTransport()
|
Method Summary | |
---|---|
com.google.api.client.http.apache.ApacheHttpRequest |
buildDeleteRequest(String url)
Builds a DELETE request. |
com.google.api.client.http.apache.ApacheHttpRequest |
buildGetRequest(String url)
Builds a GET request. |
com.google.api.client.http.apache.ApacheHttpRequest |
buildHeadRequest(String url)
Builds a HEAD request. |
com.google.api.client.http.apache.ApacheHttpRequest |
buildPatchRequest(String url)
Builds a PATCH request. |
com.google.api.client.http.apache.ApacheHttpRequest |
buildPostRequest(String url)
Builds a POST request. |
com.google.api.client.http.apache.ApacheHttpRequest |
buildPutRequest(String url)
Builds a PUT request. |
org.apache.http.client.HttpClient |
getHttpClient()
Returns the Apache HTTP client. |
void |
shutdown()
Shuts down the connection manager and releases allocated resources. |
boolean |
supportsHead()
Returns whether this HTTP transport implementation supports the HEAD request method. |
boolean |
supportsPatch()
Returns whether this HTTP transport implementation supports the PATCH request method. |
Methods inherited from class com.google.api.client.http.HttpTransport |
---|
createRequestFactory, createRequestFactory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@Deprecated public final org.apache.http.client.HttpClient httpClient
getHttpClient()
Constructor Detail |
---|
public ApacheHttpTransport()
Method Detail |
---|
public boolean supportsHead()
HttpTransport
HEAD
request method.
Default implementation returns false
.
supportsHead
in class HttpTransport
public boolean supportsPatch()
HttpTransport
PATCH
request method.
Default implementation returns false
.
supportsPatch
in class HttpTransport
public com.google.api.client.http.apache.ApacheHttpRequest buildDeleteRequest(String url)
HttpTransport
DELETE
request.
buildDeleteRequest
in class HttpTransport
url
- URLpublic com.google.api.client.http.apache.ApacheHttpRequest buildGetRequest(String url)
HttpTransport
GET
request.
buildGetRequest
in class HttpTransport
url
- URLpublic com.google.api.client.http.apache.ApacheHttpRequest buildHeadRequest(String url)
HttpTransport
HEAD
request. Won't be called if HttpTransport.supportsHead()
returns false
.
Default implementation throws an UnsupportedOperationException
.
buildHeadRequest
in class HttpTransport
url
- URLpublic com.google.api.client.http.apache.ApacheHttpRequest buildPatchRequest(String url)
HttpTransport
PATCH
request. Won't be called if HttpTransport.supportsPatch()
returns false
.
Default implementation throws an UnsupportedOperationException
.
buildPatchRequest
in class HttpTransport
url
- URLpublic com.google.api.client.http.apache.ApacheHttpRequest buildPostRequest(String url)
HttpTransport
POST
request.
buildPostRequest
in class HttpTransport
url
- URLpublic com.google.api.client.http.apache.ApacheHttpRequest buildPutRequest(String url)
HttpTransport
PUT
request.
buildPutRequest
in class HttpTransport
url
- URLpublic void shutdown()
shutdown
in class HttpTransport
public org.apache.http.client.HttpClient getHttpClient()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |