.withDecoderWrapper(serverCodecs.getFullJsonCodec()) .withConnectionTimeout(serverConfig.getRemoteRegionConnectTimeoutMs()) .withReadTimeout(serverConfig.getRemoteRegionReadTimeoutMs()) .withMaxConnectionsPerHost(serverConfig.getRemoteRegionTotalConnectionsPerHost()) .withMaxTotalConnections(serverConfig.getRemoteRegionTotalConnections())
.withDecoderWrapper(serverCodecs.getFullJsonCodec()) .withConnectionTimeout(config.getPeerNodeConnectTimeoutMs()) .withReadTimeout(config.getPeerNodeReadTimeoutMs()) .withMaxConnectionsPerHost(config.getPeerNodeTotalConnectionsPerHost()) .withMaxTotalConnections(config.getPeerNodeTotalConnections())
.withDecoderWrapper(serverCodecs.getFullJsonCodec()) .withConnectionTimeout(serverConfig.getRemoteRegionConnectTimeoutMs()) .withReadTimeout(serverConfig.getRemoteRegionReadTimeoutMs()) .withMaxConnectionsPerHost(serverConfig.getRemoteRegionTotalConnectionsPerHost()) .withMaxTotalConnections(serverConfig.getRemoteRegionTotalConnections())
.withDecoderWrapper(serverCodecs.getFullJsonCodec()) .withConnectionTimeout(serverConfig.getRemoteRegionConnectTimeoutMs()) .withReadTimeout(serverConfig.getRemoteRegionReadTimeoutMs()) .withMaxConnectionsPerHost(serverConfig.getRemoteRegionTotalConnectionsPerHost()) .withMaxTotalConnections(serverConfig.getRemoteRegionTotalConnections())
.withDecoderWrapper(serverCodecs.getFullJsonCodec()) .withConnectionTimeout(serverConfig.getRemoteRegionConnectTimeoutMs()) .withReadTimeout(serverConfig.getRemoteRegionReadTimeoutMs()) .withMaxConnectionsPerHost(serverConfig.getRemoteRegionTotalConnectionsPerHost()) .withMaxTotalConnections(serverConfig.getRemoteRegionTotalConnections())
.withDecoderWrapper(serverCodecs.getFullJsonCodec()) .withConnectionTimeout(config.getPeerNodeConnectTimeoutMs()) .withReadTimeout(config.getPeerNodeReadTimeoutMs()) .withMaxConnectionsPerHost(config.getPeerNodeTotalConnectionsPerHost()) .withMaxTotalConnections(config.getPeerNodeTotalConnections())
private JerseyEurekaHttpClientFactory buildLegacy(Map<String, String> additionalHeaders, boolean systemSSL) { EurekaJerseyClientBuilder clientBuilder = new EurekaJerseyClientBuilder() .withClientName(clientName) .withUserAgent("Java-EurekaClient") .withConnectionTimeout(connectionTimeout) .withReadTimeout(readTimeout) .withMaxConnectionsPerHost(maxConnectionsPerHost) .withMaxTotalConnections(maxTotalConnections) .withConnectionIdleTimeout((int) connectionIdleTimeout) .withEncoderWrapper(encoderWrapper) .withDecoderWrapper(decoderWrapper) .withProxy(proxyHost,String.valueOf(proxyPort),proxyUserName,proxyPassword); if (systemSSL) { clientBuilder.withSystemSSLConfiguration(); } else if (sslContext != null) { clientBuilder.withCustomSSL(sslContext); } if (hostnameVerifier != null) { clientBuilder.withHostnameVerifier(hostnameVerifier); } EurekaJerseyClient jerseyClient = clientBuilder.build(); ApacheHttpClient4 discoveryApacheClient = jerseyClient.getClient(); addFilters(discoveryApacheClient); return new JerseyEurekaHttpClientFactory(jerseyClient, additionalHeaders); }
private JerseyEurekaHttpClientFactory buildLegacy(Map<String, String> additionalHeaders, boolean systemSSL) { EurekaJerseyClientBuilder clientBuilder = new EurekaJerseyClientBuilder() .withClientName(clientName) .withUserAgent("Java-EurekaClient") .withConnectionTimeout(connectionTimeout) .withReadTimeout(readTimeout) .withMaxConnectionsPerHost(maxConnectionsPerHost) .withMaxTotalConnections(maxTotalConnections) .withConnectionIdleTimeout((int) connectionIdleTimeout) .withEncoderWrapper(encoderWrapper) .withDecoderWrapper(decoderWrapper) .withProxy(proxyHost,String.valueOf(proxyPort),proxyUserName,proxyPassword); if (systemSSL) { clientBuilder.withSystemSSLConfiguration(); } else if (sslContext != null) { clientBuilder.withCustomSSL(sslContext); } if (hostnameVerifier != null) { clientBuilder.withHostnameVerifier(hostnameVerifier); } EurekaJerseyClient jerseyClient = clientBuilder.build(); ApacheHttpClient4 discoveryApacheClient = jerseyClient.getClient(); addFilters(discoveryApacheClient); return new JerseyEurekaHttpClientFactory(jerseyClient, additionalHeaders); }