@Test public void testDefaultClient() throws Exception { NFHttpClient client = NFHttpClientFactory.getDefaultClient(); HttpGet get = new HttpGet(server.getServerURI()); HttpResponse response = client.execute(get); HttpEntity entity = response.getEntity(); String contentStr = EntityUtils.toString(entity); assertTrue(contentStr.length() > 0); }
@Override public <T> T execute( final HttpUriRequest request, final ResponseHandler<? extends T> responseHandler) throws IOException, ClientProtocolException { return this.execute(request, responseHandler, null); }
NFHttpClient extends DefaultHttpClient { @Override public <T> T execute( final HttpUriRequest request, final ResponseHandler<? extends T> responseHandler) throws IOException, ClientProtocolException { return this.execute(request, responseHandler, null); } }
NFHttpClient extends DefaultHttpClient { @Override public <T> T execute( final HttpUriRequest request, final ResponseHandler<? extends T> responseHandler) throws IOException, ClientProtocolException { return this.execute(request, responseHandler, null); } protected  NFHttpClient(String host, int port); protected  NFHttpClient(); protected  NFHttpClient(String name); protected  NFHttpClient(String name, IClientConfig config); protected  NFHttpClient(String name, IClientConfig config, boolean registerMonitor); }
NFHttpClient extends DefaultHttpClient { @Override public <T> T execute( final HttpUriRequest request, final ResponseHandler<? extends T> responseHandler) throws IOException, ClientProtocolException { return this.execute(request, responseHandler, null); } protected  NFHttpClient(String host, int port); protected  NFHttpClient(); protected  NFHttpClient(String name); protected  NFHttpClient(String name, IClientConfig config); protected  NFHttpClient(String name, IClientConfig config, boolean registerMonitor); void initConnectionCleanerTask(); @Monitor(name = "HttpClient-ConnPoolCleaner", type = DataSourceType.INFORMATIONAL) ConnectionPoolCleaner getConnPoolCleaner(); @Monitor(name = "HttpClient-ConnIdleEvictTimeMilliSeconds", type = DataSourceType.INFORMATIONAL) Property<Integer> getConnIdleEvictTimeMilliSeconds(); @Monitor(name="HttpClient-ConnectionsInPool", type = DataSourceType.GAUGE) int getConnectionsInPool(); @Monitor(name = "HttpClient-MaxTotalConnections", type = DataSourceType.INFORMATIONAL) int getMaxTotalConnnections(); @Monitor(name = "HttpClient-MaxConnectionsPerHost", type = DataSourceType.INFORMATIONAL) int getMaxConnectionsPerHost(); @Monitor(name = "HttpClient-NumRetries", type = DataSourceType.INFORMATIONAL) int getNumRetries(); void setConnIdleEvictTimeMilliSeconds(Property<Integer> connIdleEvictTimeMilliSeconds); @Monitor(name = "HttpClient-SleepTimeFactorMs", type = DataSourceType.INFORMATIONAL) int getSleepTimeFactorMs(); @Override T execute(
			final HttpUriRequest request,
			final ResponseHandler<? extends T> responseHandler); @Override T execute(
			final HttpUriRequest request,
			final ResponseHandler<? extends T> responseHandler,
			final HttpContext context); @Override T execute(
			final HttpHost target,
			final HttpRequest request,
			final ResponseHandler<? extends T> responseHandler); @Override T execute(
			final HttpHost target,
			final HttpRequest request,
			final ResponseHandler<? extends T> responseHandler,
			final HttpContext context); void shutdown(); }
NFHttpClient extends DefaultHttpClient { @Override public <T> T execute( final HttpUriRequest request, final ResponseHandler<? extends T> responseHandler) throws IOException, ClientProtocolException { return this.execute(request, responseHandler, null); } protected  NFHttpClient(String host, int port); protected  NFHttpClient(); protected  NFHttpClient(String name); protected  NFHttpClient(String name, IClientConfig config); protected  NFHttpClient(String name, IClientConfig config, boolean registerMonitor); void initConnectionCleanerTask(); @Monitor(name = "HttpClient-ConnPoolCleaner", type = DataSourceType.INFORMATIONAL) ConnectionPoolCleaner getConnPoolCleaner(); @Monitor(name = "HttpClient-ConnIdleEvictTimeMilliSeconds", type = DataSourceType.INFORMATIONAL) Property<Integer> getConnIdleEvictTimeMilliSeconds(); @Monitor(name="HttpClient-ConnectionsInPool", type = DataSourceType.GAUGE) int getConnectionsInPool(); @Monitor(name = "HttpClient-MaxTotalConnections", type = DataSourceType.INFORMATIONAL) int getMaxTotalConnnections(); @Monitor(name = "HttpClient-MaxConnectionsPerHost", type = DataSourceType.INFORMATIONAL) int getMaxConnectionsPerHost(); @Monitor(name = "HttpClient-NumRetries", type = DataSourceType.INFORMATIONAL) int getNumRetries(); void setConnIdleEvictTimeMilliSeconds(Property<Integer> connIdleEvictTimeMilliSeconds); @Monitor(name = "HttpClient-SleepTimeFactorMs", type = DataSourceType.INFORMATIONAL) int getSleepTimeFactorMs(); @Override T execute(
			final HttpUriRequest request,
			final ResponseHandler<? extends T> responseHandler); @Override T execute(
			final HttpUriRequest request,
			final ResponseHandler<? extends T> responseHandler,
			final HttpContext context); @Override T execute(
			final HttpHost target,
			final HttpRequest request,
			final ResponseHandler<? extends T> responseHandler); @Override T execute(
			final HttpHost target,
			final HttpRequest request,
			final ResponseHandler<? extends T> responseHandler,
			final HttpContext context); void shutdown();  }