|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.jersey.api.client.filter.Filterable
com.sun.jersey.api.client.Client
org.sonatype.spice.jersey.client.ahc.AhcHttpClient
public class AhcHttpClient
A Client that utilizes the AsyncHttpClient to send and receive
HTTP request and responses.
If an AhcClientHandler is not explicitly passed as a
constructor or method parameter then by default an instance is created with
an AsyncHttpClient constructed
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.
| Constructor Summary | |
|---|---|
AhcHttpClient()
Create a new client instance. |
|
AhcHttpClient(AhcClientHandler root)
Create a new client instance. |
|
AhcHttpClient(AhcClientHandler root,
com.sun.jersey.api.client.config.ClientConfig config,
com.sun.jersey.core.spi.component.ioc.IoCComponentProviderFactory provider)
Deprecated. the config parameter is no longer utilized and instead the config obtained from the AhcClientHandler.getConfig()
is utilized instead. |
|
AhcHttpClient(AhcClientHandler root,
com.sun.jersey.core.spi.component.ioc.IoCComponentProviderFactory provider)
Create a new instance with a client configuration and a component provider. |
|
| Method Summary | |
|---|---|
static AhcHttpClient |
create()
Create a default client. |
static AhcHttpClient |
create(com.sun.jersey.api.client.config.ClientConfig cc)
Create a default client with client configuration. |
static AhcHttpClient |
create(com.sun.jersey.api.client.config.ClientConfig cc,
com.sun.jersey.core.spi.component.ioc.IoCComponentProviderFactory provider)
Create a default client with client configuration and component provider. |
void |
destroy()
|
protected void |
finalize()
|
AhcClientHandler |
getClientHandler()
Get the AsyncHttpClient client handler. |
void |
setConnectTimeout(Integer interval)
|
void |
setFollowRedirects(Boolean redirect)
|
void |
setReadTimeout(Integer interval)
|
| Methods inherited from class com.sun.jersey.api.client.Client |
|---|
asyncResource, asyncResource, asyncView, asyncView, asyncView, asyncView, asyncViewResource, asyncViewResource, getExecutorService, getMessageBodyWorkers, getProperties, getProviders, getViewProxy, handle, inject, resource, resource, setChunkedEncodingSize, setExecutorService, view, view, view, view, view, view, viewResource, viewResource |
| Methods inherited from class com.sun.jersey.api.client.filter.Filterable |
|---|
addFilter, getHeadHandler, isFilterPreset, removeAllFilters, removeFilter |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AhcHttpClient()
public AhcHttpClient(AhcClientHandler root)
root - the root client handler for dispatching a request and
returning a response.
@Deprecated
public AhcHttpClient(AhcClientHandler root,
com.sun.jersey.api.client.config.ClientConfig config,
com.sun.jersey.core.spi.component.ioc.IoCComponentProviderFactory provider)
AhcClientHandler.getConfig()
is utilized instead.
root - the root client handler for dispatching a request and
returning a response.config - the client configuration.provider - the IoC component provider factory.
public AhcHttpClient(AhcClientHandler root,
com.sun.jersey.core.spi.component.ioc.IoCComponentProviderFactory provider)
root - the root client handler for dispatching a request and
returning a response.provider - the IoC component provider factory.| Method Detail |
|---|
public AhcClientHandler getClientHandler()
public static AhcHttpClient create()
public static AhcHttpClient create(com.sun.jersey.api.client.config.ClientConfig cc)
cc - the client configuration.
public static AhcHttpClient create(com.sun.jersey.api.client.config.ClientConfig cc,
com.sun.jersey.core.spi.component.ioc.IoCComponentProviderFactory provider)
cc - the client configuration.provider - the IoC component provider factory.
public void destroy()
destroy in class com.sun.jersey.api.client.Clientprotected void finalize()
finalize in class com.sun.jersey.api.client.Clientpublic void setFollowRedirects(Boolean redirect)
setFollowRedirects in class com.sun.jersey.api.client.Clientpublic void setReadTimeout(Integer interval)
setReadTimeout in class com.sun.jersey.api.client.Clientpublic void setConnectTimeout(Integer interval)
setConnectTimeout in class com.sun.jersey.api.client.Client
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||