org.apache.wink.client
Class ApacheHttpClientConfig
java.lang.Object
org.apache.wink.client.ClientConfig
org.apache.wink.client.ApacheHttpClientConfig
- All Implemented Interfaces:
- java.lang.Cloneable
public class ApacheHttpClientConfig
- extends ClientConfig
Configuration object that wraps Apache HttpClient as underling Http client.
The following code snippet, demonstrates the typical usage:
// create the client that uses Apache DefaultHttpClient as underling Http client.
RestClient client = new RestClient(new ApacheHttpClientConfig(new DefaultHttpClient()));
// create the resource to make invocations on
Resource resource = client.resource("http://myhost:80/my/service");
// invoke GET on the resource and receive the response entity as a string
String entity = resource.get(String.class);
...
Methods inherited from class org.apache.wink.client.ClientConfig |
applications, clone, connectTimeout, followRedirects, getApplications, getConnectTimeout, getHandlers, getProxyHost, getProxyPort, getReadTimeout, handlers, isFollowRedirects, proxyHost, proxyPort, readTimeout |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ApacheHttpClientConfig
public ApacheHttpClientConfig()
ApacheHttpClientConfig
public ApacheHttpClientConfig(org.apache.http.client.HttpClient client)
getConnectionHandler
protected ConnectionHandler getConnectionHandler()
- Overrides:
getConnectionHandler
in class ClientConfig
Copyright © 2009 The Apache Software Foundation. All Rights Reserved.