use of com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient in project eureka by Netflix.
the class EurekaServerHttpClients method createRemoteRegionClient.
/**
* {@link EurekaHttpClient} for remote region replication.
*/
public static EurekaHttpClient createRemoteRegionClient(EurekaServerConfig serverConfig, EurekaTransportConfig transportConfig, ServerCodecs serverCodecs, ClusterResolver<EurekaEndpoint> clusterResolver) {
JerseyRemoteRegionClientFactory jerseyFactory = new JerseyRemoteRegionClientFactory(serverConfig, serverCodecs, clusterResolver.getRegion());
TransportClientFactory metricsFactory = MetricsCollectingEurekaHttpClient.createFactory(jerseyFactory);
SessionedEurekaHttpClient client = new SessionedEurekaHttpClient(Names.REMOTE, RetryableEurekaHttpClient.createFactory(Names.REMOTE, transportConfig, clusterResolver, createFactory(metricsFactory), ServerStatusEvaluators.legacyEvaluator()), RECONNECT_INTERVAL_MINUTES * 60 * 1000);
return client;
}
Aggregations