}
public class SingleClient implements HttpClientPool {
SingleClient() {
org.apache.http.client.HttpClient client = new DefaultHttpClient();
ClientConnectionManager mgr = client.getConnectionManager();
if (!(mgr instanceof ThreadSafeClientConnManager)) {
HttpParams params = client.getParams();
client = new DefaultHttpClient(new ThreadSafeClientConnManager(
params, mgr.getSchemeRegistry()), params);
}
// Use Proxy to access if you are in one of the countries that cannot connects to twitter directly.
// HttpHost proxy = new HttpHost("your_proxy_url", your_proxy_port);
// client.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY,