Class EurekaUtils

    • Constructor Summary

      Constructors 
      Constructor Description
      EurekaUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getPrivateIp​(InstanceInfo instanceInfo)
      return the privateIp address of the given InstanceInfo record.
      static boolean isInEc2​(InstanceInfo instanceInfo)
      check to see if the instanceInfo record is of a server that is deployed within EC2 (best effort check based on assumptions of underlying id).
      static boolean isInVpc​(InstanceInfo instanceInfo)
      check to see if the instanceInfo record is of a server that is deployed within EC2 VPC (best effort check based on assumption of existing vpcId).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EurekaUtils

        public EurekaUtils()
    • Method Detail

      • getPrivateIp

        public static java.lang.String getPrivateIp​(InstanceInfo instanceInfo)
        return the privateIp address of the given InstanceInfo record. The record could be for the local server or a remote server.
        Parameters:
        instanceInfo -
        Returns:
        the private Ip (also known as localIpv4 in ec2)
      • isInEc2

        public static boolean isInEc2​(InstanceInfo instanceInfo)
        check to see if the instanceInfo record is of a server that is deployed within EC2 (best effort check based on assumptions of underlying id). This check could be for the local server or a remote server.
        Parameters:
        instanceInfo -
        Returns:
        true if the record contains an EC2 style "i-*" id
      • isInVpc

        public static boolean isInVpc​(InstanceInfo instanceInfo)
        check to see if the instanceInfo record is of a server that is deployed within EC2 VPC (best effort check based on assumption of existing vpcId). This check could be for the local server or a remote server.
        Parameters:
        instanceInfo -
        Returns:
        true if the record contains a non null, non empty AWS vpcId