public KojiClient( KojiConfig config, PasswordManager passwordManager, ExecutorService executorService, MetricRegistry metricRegistry ) throws KojiClientException { this.config = config; this.httpFactory = new HttpFactory( passwordManager ); this.executorService = executorService; this.metricRegistry = metricRegistry; setup(); }
public IndyClientHttp( final PasswordManager passwordManager, final IndyObjectMapper mapper, SiteConfig location, String apiVersion ) throws IndyClientException { this.objectMapper = mapper; this.location = location; baseUrl = location.getUri(); checkBaseUrl( baseUrl ); addApiVersionHeader( apiVersion ); factory = new HttpFactory( passwordManager ); }
public HttpImpl( final PasswordManager passwords ) { this.passwords = passwords; this.locationLookup = new LocationLookup(); this.httpFactory = new HttpFactory( new HttpFactoryPasswordDelegate( passwords, locationLookup ) ); }
@PostConstruct public void setup() { passwordManager = new org.commonjava.maven.galley.auth.AttributePasswordManager(); http = new HttpImpl( passwordManager ); httpFactory = new HttpFactory( new AttributePasswordManager( siteConfigLookup ) ); }
public IndyClientHttp( final IndyClientAuthenticator authenticator, final IndyObjectMapper mapper, SiteConfig location, String apiVersion ) throws IndyClientException { this.objectMapper = mapper; this.location = location; baseUrl = location.getUri(); checkBaseUrl( baseUrl ); addApiVersionHeader( apiVersion ); factory = new HttpFactory( authenticator ); }
@PostConstruct private void postConstruct() { try { PasswordManager emptyPasswordManager = new MemoryPasswordManager(); SiteConfig sc = new SiteConfigBuilder().withId("Carto") .withUri(config.getConfig().getCartographerServerUrl()) .withRequestTimeoutSeconds(config.getConfig().getAproxRequestTimeout()).build(); HttpFactory httpFactory = new HttpFactory(emptyPasswordManager); cartographer = new CartographerRESTClient(sc, httpFactory); } catch (ConfigurationParseException | ClientHttpException e) { throw new IllegalStateException("Could not initialize Cartographer Client.", e); } }