use of com.netflix.discovery.shared.transport.jersey2.Jersey2ApplicationClientFactory.Jersey2ApplicationClientFactoryBuilder in project eureka by Netflix.
the class AbstractJersey2EurekaHttpClientTest method getEurekaHttpClient.
@Override
protected EurekaHttpClient getEurekaHttpClient(URI serviceURI) {
Jersey2ApplicationClientFactoryBuilder factoryBuilder = Jersey2ApplicationClientFactory.newBuilder();
if (serviceURI.getUserInfo() != null) {
factoryBuilder.withFeature(HttpAuthenticationFeature.basicBuilder().build());
}
TransportClientFactory clientFactory = factoryBuilder.build();
jersey2HttpClient = (AbstractJersey2EurekaHttpClient) clientFactory.newClient(new DefaultEndpoint(serviceURI.toString()));
return jersey2HttpClient;
}
Aggregations