Class EurekaServer


  • public class EurekaServer
    extends Object
    • Constructor Detail

      • EurekaServer

        public EurekaServer()
    • Method Detail

      • getInstance

        public Optional<com.netflix.appinfo.InstanceInfo> getInstance​(String appId,
                                                                      String instanceId)
      • applicationsThatMatchVipAddressFromPath

        public List<com.netflix.discovery.shared.Application> applicationsThatMatchVipAddressFromPath​(String path)
      • cleanupApps

        public void cleanupApps()
        Clears all applications, heartbeats, and heartbeat history from the running Eureka server. Also resets the heartbeat failure count to zero.

        If you want a "fresh" Eureka server for each test, then call this in a BeforeEach or AfterEach method.

      • updateHeartbeatFor

        public void updateHeartbeatFor​(String appName,
                                       String hostName,
                                       int statusCode,
                                       com.netflix.appinfo.InstanceInfo.InstanceStatus instanceStatus)
      • registerApplication

        public void registerApplication​(com.netflix.appinfo.InstanceInfo instance)
      • getApplicationByName

        public Optional<com.netflix.discovery.shared.Application> getApplicationByName​(String appName)
      • unregisterApplication

        public void unregisterApplication​(com.netflix.discovery.shared.Application application,
                                          String appName,
                                          String hostName)