Java Code Examples for com.netflix.discovery.EurekaClient#registerEventListener()

The following examples show how to use com.netflix.discovery.EurekaClient#registerEventListener() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EurekaHostCallerIdResolver.java    From titus-control-plane with Apache License 2.0 5 votes vote down vote up
@Inject
public EurekaHostCallerIdResolver(EurekaClient eurekaClient, @Named(OFFICE_IP_RANGES) String officeIpRanges) {
    this.eurekaClient = eurekaClient;
    this.officeNetworkPredicate = NetworkExt.buildNetworkMatchPredicate(splitByComma(officeIpRanges));
    refreshAddressCache();
    eurekaClient.registerEventListener(this);
}
 
Example 2
Source File: SingleServiceLoadBalancer.java    From titus-control-plane with Apache License 2.0 5 votes vote down vote up
public SingleServiceLoadBalancer(EurekaClient eurekaClient,
                                 String vipAddress,
                                 boolean secure,
                                 TitusRuntime titusRuntime) {
    this.clock = titusRuntime.getClock();
    this.eurekaClient = eurekaClient;
    this.vipAddress = vipAddress;
    this.secure = secure;
    eurekaClient.registerEventListener(this);
    refresh();
}