Search in sources :

Example 16 with ApplicationInfoManager

use of com.netflix.appinfo.ApplicationInfoManager in project eureka by Netflix.

the class DiscoveryClientResource method createApplicationManager.

private ApplicationInfoManager createApplicationManager() {
    if (applicationManager == null) {
        EurekaInstanceConfig instanceConfig = new MyDataCenterInstanceConfig(EUREKA_TEST_NAMESPACE) {

            @Override
            public String getAppname() {
                return "discoveryClientTest";
            }

            @Override
            public int getLeaseRenewalIntervalInSeconds() {
                return 1;
            }
        };
        applicationManager = new ApplicationInfoManager(instanceConfig);
    }
    return applicationManager;
}
Also used : EurekaInstanceConfig(com.netflix.appinfo.EurekaInstanceConfig) MyDataCenterInstanceConfig(com.netflix.appinfo.MyDataCenterInstanceConfig) ApplicationInfoManager(com.netflix.appinfo.ApplicationInfoManager)

Aggregations

ApplicationInfoManager (com.netflix.appinfo.ApplicationInfoManager)16 MyDataCenterInstanceConfig (com.netflix.appinfo.MyDataCenterInstanceConfig)10 InstanceInfo (com.netflix.appinfo.InstanceInfo)9 DefaultEurekaClientConfig (com.netflix.discovery.DefaultEurekaClientConfig)6 DiscoveryClient (com.netflix.discovery.DiscoveryClient)6 EurekaInstanceConfig (com.netflix.appinfo.EurekaInstanceConfig)5 EurekaClient (com.netflix.discovery.EurekaClient)5 EurekaClientConfig (com.netflix.discovery.EurekaClientConfig)4 Before (org.junit.Before)4 EurekaConfigBasedInstanceInfoProvider (com.netflix.appinfo.providers.EurekaConfigBasedInstanceInfoProvider)3 PeerAwareInstanceRegistry (com.netflix.eureka.registry.PeerAwareInstanceRegistry)3 Test (org.junit.Test)3 AmazonInfo (com.netflix.appinfo.AmazonInfo)2 DataCenterInfo (com.netflix.appinfo.DataCenterInfo)2 Archaius2VipAddressResolver (com.netflix.appinfo.providers.Archaius2VipAddressResolver)2 VipAddressResolver (com.netflix.appinfo.providers.VipAddressResolver)2 EurekaServerConfig (com.netflix.eureka.EurekaServerConfig)2 PeerEurekaNodes (com.netflix.eureka.cluster.PeerEurekaNodes)2 DefaultServerCodecs (com.netflix.eureka.resources.DefaultServerCodecs)2 ServerCodecs (com.netflix.eureka.resources.ServerCodecs)2