All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.netflix.karyon.eureka.DefaultEurekaKaryonStatusBridge Maven / Gradle / Ivy

package com.netflix.karyon.eureka;

import com.netflix.appinfo.InstanceInfo;

/**
 * @author Nitesh Kant
 */
public class DefaultEurekaKaryonStatusBridge implements EurekaKaryonStatusBridge {

    @Override
    public InstanceInfo.InstanceStatus interpretKaryonStatus(int karyonStatus) {
        if(karyonStatus == 204) {
            return InstanceInfo.InstanceStatus.STARTING;
        } else if (karyonStatus >= 200 && karyonStatus < 300) {
            return InstanceInfo.InstanceStatus.UP;
        }

        return InstanceInfo.InstanceStatus.DOWN;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy