|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jersey.client.apache.ApacheHttpClientHandler
public final class ApacheHttpClientHandler
A root handler with Jakarta Commons HttpClient acting as a backend.
Client operations are thread safe, the HTTP connection may be shared between different threads.
If a response entity is obtained that is an instance of Closeable
then the instance MUST be closed after processing the entity to release
connection-based resources.
If a ClientResponse
is obtained and an entity is not read from the
response then ClientResponse.close()
MUST be called after processing
the response to release connection-based resources.
The following methods are currently supported: HEAD, GET, POST, PUT, DELETE and OPTIONS.
Chunked transfer encoding can be enabled or disabled but configuration of
the chunked encoding size is not possible. If the
ClientConfig.PROPERTY_CHUNKED_ENCODING_SIZE
property is set
to a non-null value then chunked transfer encoding is enabled.
Constructor Summary | |
---|---|
ApacheHttpClientHandler(org.apache.commons.httpclient.HttpClient client)
Create a new root handler with an HttpClient . |
|
ApacheHttpClientHandler(org.apache.commons.httpclient.HttpClient client,
ClientConfig config)
Create a new root handler with an HttpClient . |
|
ApacheHttpClientHandler(org.apache.commons.httpclient.HttpClient client,
ClientConfig config,
ApacheHttpMethodExecutor methodExecutor)
Create a new root handler with an HttpClient . |
Method Summary | |
---|---|
ClientConfig |
getConfig()
Get the client config. |
org.apache.commons.httpclient.HttpClient |
getHttpClient()
Get the HttpClient . |
ClientResponse |
handle(ClientRequest cr)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ApacheHttpClientHandler(org.apache.commons.httpclient.HttpClient client)
HttpClient
.
client
- the HttpClient
.public ApacheHttpClientHandler(org.apache.commons.httpclient.HttpClient client, ClientConfig config)
HttpClient
.
client
- the HttpClient
.config
- the client configuration.public ApacheHttpClientHandler(org.apache.commons.httpclient.HttpClient client, ClientConfig config, ApacheHttpMethodExecutor methodExecutor)
HttpClient
.
client
- the HttpClient
.config
- the client configuration.methodExecutor
- the method executor.Method Detail |
---|
public ClientConfig getConfig()
public org.apache.commons.httpclient.HttpClient getHttpClient()
HttpClient
.
HttpClient
.public ClientResponse handle(ClientRequest cr) throws ClientHandlerException
handle
in interface ClientHandler
ClientHandlerException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |