Search in sources :

Example 1 with SessionedEurekaHttpClient

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;
}
Also used : SessionedEurekaHttpClient(com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient) TransportClientFactory(com.netflix.discovery.shared.transport.TransportClientFactory)

Aggregations

TransportClientFactory (com.netflix.discovery.shared.transport.TransportClientFactory)1 SessionedEurekaHttpClient (com.netflix.discovery.shared.transport.decorator.SessionedEurekaHttpClient)1