Search in sources :

Example 1 with Jersey1DiscoveryClientOptionalArgs

use of com.netflix.discovery.shared.transport.jersey.Jersey1DiscoveryClientOptionalArgs in project eureka by Netflix.

the class DiscoveryClientResource method getClient.

public EurekaClient getClient() {
    if (client == null) {
        try {
            applicationInfoManager = createApplicationManager();
            EurekaClientConfig clientConfig = createEurekaClientConfig();
            Jersey1DiscoveryClientOptionalArgs optionalArgs = new Jersey1DiscoveryClientOptionalArgs();
            eventBus = new EventBusImpl();
            optionalArgs.setEventBus(eventBus);
            client = new DiscoveryClient(applicationInfoManager, clientConfig, optionalArgs);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
    return client;
}
Also used : DefaultEurekaClientConfig(com.netflix.discovery.DefaultEurekaClientConfig) EurekaClientConfig(com.netflix.discovery.EurekaClientConfig) EventBusImpl(com.netflix.eventbus.impl.EventBusImpl) DiscoveryClient(com.netflix.discovery.DiscoveryClient) InvalidSubscriberException(com.netflix.eventbus.spi.InvalidSubscriberException) Jersey1DiscoveryClientOptionalArgs(com.netflix.discovery.shared.transport.jersey.Jersey1DiscoveryClientOptionalArgs)

Aggregations

DefaultEurekaClientConfig (com.netflix.discovery.DefaultEurekaClientConfig)1 DiscoveryClient (com.netflix.discovery.DiscoveryClient)1 EurekaClientConfig (com.netflix.discovery.EurekaClientConfig)1 Jersey1DiscoveryClientOptionalArgs (com.netflix.discovery.shared.transport.jersey.Jersey1DiscoveryClientOptionalArgs)1 EventBusImpl (com.netflix.eventbus.impl.EventBusImpl)1 InvalidSubscriberException (com.netflix.eventbus.spi.InvalidSubscriberException)1