TrustedHttpClientImpl implements TrustedHttpClient, HttpConnectionMXBean { @Override public HttpResponse execute(HttpUriRequest httpUriRequest) throws TrustedHttpClientException { return execute(httpUriRequest, DEFAULT_CONNECTION_TIMEOUT, DEFAULT_SOCKET_TIMEOUT); } TrustedHttpClientImpl();  TrustedHttpClientImpl(String user, String pass); @Activate void activate(ComponentContext cc); @Reference(name = "serviceRegistry", cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC, unbind = "unsetServiceRegistry") void setServiceRegistry(ServiceRegistry serviceRegistry); void unsetServiceRegistry(ServiceRegistry serviceRegistry); @Reference(name = "securityService") void setSecurityService(SecurityService securityService); @Reference(name = "urlSigningService") void setUrlSigningService(UrlSigningService urlSigningService); @Deactivate void deactivate(); @Reference(name = "service-impl") void setHttpClientFactory(HttpClientFactory httpClientFactory); HttpClient makeHttpClient(int connectionTimeout, int socketTimeout); @Override Function<Function<HttpResponse, A>, Either<Exception, A>> run(final HttpUriRequest httpUriRequest); @Override RequestRunner<A> runner(HttpUriRequest req); @Override HttpResponse execute(HttpUriRequest httpUriRequest); @Override HttpResponse execute(HttpUriRequest httpUriRequest, int connectionTimeout, int socketTimeout); @Override void close(HttpResponse response); @Override int getOpenConnections(); int getNonceTimeoutRetries(); int getRetryBaseDelay(); int getRetryMaximumVariableTime(); static final String AUTHORIZATION_HEADER_NAME; static final String DIGEST_AUTH_USER_KEY; static final String DIGEST_AUTH_PASS_KEY; static final String NONCE_TIMEOUT_RETRY_KEY; static final String NONCE_TIMEOUT_RETRY_BASE_TIME_KEY; static final String NONCE_TIMEOUT_RETRY_MAXIMUM_VARIABLE_TIME_KEY; static final int DEFAULT_CONNECTION_TIMEOUT; static final int DEFAULT_SOCKET_TIMEOUT; static final int DEFAULT_NONCE_TIMEOUT_RETRIES; static final int DEFAULT_RETRY_BASE_TIME; static final int DEFAULT_RETRY_MAXIMUM_VARIABLE_TIME; }
@Test public void noDefaultHttpConnectionFactoryResultsInException() { try { client.execute(new HttpPost("http: Assert.fail(); } catch (TrustedHttpClientException e) { } }