Remove deprecated DiscoveryClient.getLocalServiceInstance()

parent 71bd19d5
......@@ -16,8 +16,6 @@
package org.springframework.cloud.netflix.eureka;
import static com.netflix.appinfo.InstanceInfo.PortType.SECURE;
import java.net.URI;
import java.util.ArrayList;
import java.util.Collections;
......@@ -35,6 +33,8 @@ import com.netflix.discovery.EurekaClient;
import com.netflix.discovery.shared.Application;
import com.netflix.discovery.shared.Applications;
import static com.netflix.appinfo.InstanceInfo.PortType.SECURE;
/**
* @author Spencer Gibb
*/
......@@ -57,41 +57,6 @@ public class EurekaDiscoveryClient implements DiscoveryClient {
}
@Override
public ServiceInstance getLocalServiceInstance() {
return new ServiceInstance() {
@Override
public String getServiceId() {
return EurekaDiscoveryClient.this.config.getAppname();
}
@Override
public String getHost() {
return EurekaDiscoveryClient.this.config.getHostName(false);
}
@Override
public int getPort() {
return EurekaDiscoveryClient.this.config.getNonSecurePort();
}
@Override
public boolean isSecure() {
return EurekaDiscoveryClient.this.config.getSecurePortEnabled();
}
@Override
public URI getUri() {
return DefaultServiceInstance.getUri(this);
}
@Override
public Map<String, String> getMetadata() {
return EurekaDiscoveryClient.this.config.getMetadataMap();
}
};
}
@Override
public List<ServiceInstance> getInstances(String serviceId) {
List<InstanceInfo> infos = this.eurekaClient.getInstancesByVipAddress(serviceId,
false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment