@Test public void directProxyIsConfigurableOnClientRequests() { TestResource clientWithDirectCall = AtlasDbHttpClients.createProxyWithFailover( MetricsManagers.createForTests(), ImmutableServerListConfig.builder() .addServers(getUriForPort(availablePort1)) .sslConfiguration(SSL_CONFIG) .proxyConfiguration(ProxyConfiguration.DIRECT) .build(), TestResource.class, AUXILIARY_REMOTING_PARAMETERS); clientWithDirectCall.getTestNumber(); availableServer1.verify(getRequestedFor(urlMatching(GET_ENDPOINT)) .withHeader(USER_AGENT_HEADER, WireMock.containing(ATLASDB_CLIENT_V2_AGENT_STRING))); }
public static <T> T createProxyWithFailover( MetricsManager metricsManager, ServerListConfig serverListConfig, Class<T> type, AuxiliaryRemotingParameters parameters) { Supplier<T> clientFactory = () -> instrument( metricsManager.getTaggedRegistry(), ConjureJavaRuntimeTargetFactory.DEFAULT.createProxyWithFailover(serverListConfig, type, parameters), type); return wrapWithOkHttpBugHandling(type, clientFactory); }
AtlasDbHttpClients { public static <T> T createProxyWithFailover( MetricsManager metricsManager, ServerListConfig serverListConfig, Class<T> type, AuxiliaryRemotingParameters parameters) { Supplier<T> clientFactory = () -> instrument( metricsManager.getTaggedRegistry(), ConjureJavaRuntimeTargetFactory.DEFAULT.createProxyWithFailover(serverListConfig, type, parameters), type); return wrapWithOkHttpBugHandling(type, clientFactory); } }
AtlasDbHttpClients { public static <T> T createProxyWithFailover( MetricsManager metricsManager, ServerListConfig serverListConfig, Class<T> type, AuxiliaryRemotingParameters parameters) { Supplier<T> clientFactory = () -> instrument( metricsManager.getTaggedRegistry(), ConjureJavaRuntimeTargetFactory.DEFAULT.createProxyWithFailover(serverListConfig, type, parameters), type); return wrapWithOkHttpBugHandling(type, clientFactory); } private  AtlasDbHttpClients(); }
AtlasDbHttpClients { public static <T> T createProxyWithFailover( MetricsManager metricsManager, ServerListConfig serverListConfig, Class<T> type, AuxiliaryRemotingParameters parameters) { Supplier<T> clientFactory = () -> instrument( metricsManager.getTaggedRegistry(), ConjureJavaRuntimeTargetFactory.DEFAULT.createProxyWithFailover(serverListConfig, type, parameters), type); return wrapWithOkHttpBugHandling(type, clientFactory); } private  AtlasDbHttpClients(); static T createProxy(
            Optional<TrustContext> trustContext,
            String uri,
            Class<T> type,
            AuxiliaryRemotingParameters parameters); static T createProxyWithFailover(
            MetricsManager metricsManager,
            ServerListConfig serverListConfig,
            Class<T> type,
            AuxiliaryRemotingParameters parameters); static T createLiveReloadingProxyWithFailover(
            MetricsManager metricsManager,
            Supplier<ServerListConfig> serverListConfigSupplier,
            Class<T> type,
            AuxiliaryRemotingParameters clientParameters); static T createDialogueProxy(TaggedMetricRegistry registry, Class<T> type, Channel channel); static T createUninstrumentedDialogueProxy(Class<T> type, Channel channel); }
AtlasDbHttpClients { public static <T> T createProxyWithFailover( MetricsManager metricsManager, ServerListConfig serverListConfig, Class<T> type, AuxiliaryRemotingParameters parameters) { Supplier<T> clientFactory = () -> instrument( metricsManager.getTaggedRegistry(), ConjureJavaRuntimeTargetFactory.DEFAULT.createProxyWithFailover(serverListConfig, type, parameters), type); return wrapWithOkHttpBugHandling(type, clientFactory); } private  AtlasDbHttpClients(); static T createProxy(
            Optional<TrustContext> trustContext,
            String uri,
            Class<T> type,
            AuxiliaryRemotingParameters parameters); static T createProxyWithFailover(
            MetricsManager metricsManager,
            ServerListConfig serverListConfig,
            Class<T> type,
            AuxiliaryRemotingParameters parameters); static T createLiveReloadingProxyWithFailover(
            MetricsManager metricsManager,
            Supplier<ServerListConfig> serverListConfigSupplier,
            Class<T> type,
            AuxiliaryRemotingParameters clientParameters); static T createDialogueProxy(TaggedMetricRegistry registry, Class<T> type, Channel channel); static T createUninstrumentedDialogueProxy(Class<T> type, Channel channel);  }