@Override public <T> T execute(HttpUriRequest httpUriRequest, ResponseHandler<T> responseHandler, int connectionTimeout, int socketTimeout) throws TrustedHttpClientException { try { return responseHandler.handleResponse(execute(httpUriRequest, connectionTimeout, socketTimeout)); } catch (IOException e) { throw new TrustedHttpClientException(e); } }
@Override public <T> T execute(HttpUriRequest httpUriRequest, ResponseHandler<T> responseHandler, int connectionTimeout, int socketTimeout) throws TrustedHttpClientException { try { return responseHandler.handleResponse(execute(httpUriRequest, connectionTimeout, socketTimeout)); } catch (IOException e) { throw new TrustedHttpClientException(e); } }
/** Creates a new HttpClient to use to make requests. */ public HttpClient makeHttpClient(int connectionTimeout, int socketTimeout) throws TrustedHttpClientException { if (httpClientFactory == null) { throw new TrustedHttpClientException(new NullPointerException( "There is no DefaultHttpClientFactory service available so we cannot make a request")); } HttpClient httpClient = httpClientFactory.makeHttpClient(); httpClient.getParams().setIntParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, connectionTimeout); httpClient.getParams().setIntParameter(CoreConnectionPNames.SO_TIMEOUT, socketTimeout); return httpClient; }
throw new TrustedHttpClientException(e);
throw new TrustedHttpClientException(e); throw new TrustedHttpClientException(e);
throw new TrustedHttpClientException(e);
throw new TrustedHttpClientException(e);
} catch (IOException e) { httpClient.getConnectionManager().shutdown(); throw new TrustedHttpClientException(e);
} catch (IOException e) { httpClient.getConnectionManager().shutdown(); throw new TrustedHttpClientException(e);
throw new TrustedHttpClientException(e); throw new TrustedHttpClientException(e);