Class InetNameLookup


  • public class InetNameLookup
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getCanonicalHostName​(java.lang.String host)
      Gets the fully qualified domain name for this IP address or hostname.
      static boolean isEnabled()  
      static void setDisableOnFailure​(boolean state)  
      static void setLookupEnabled​(boolean enable)  
      • Methods inherited from class java.lang.Object

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

      • setDisableOnFailure

        public static void setDisableOnFailure​(boolean state)
      • setLookupEnabled

        public static void setLookupEnabled​(boolean enable)
      • isEnabled

        public static boolean isEnabled()
      • getCanonicalHostName

        public static java.lang.String getCanonicalHostName​(java.lang.String host)
                                                     throws java.net.UnknownHostException
        Gets the fully qualified domain name for this IP address or hostname. Best effort method, meaning we may not be able to return the FQDN depending on the underlying system configuration.
        Parameters:
        host - IP address or hostname
        Returns:
        the fully qualified domain name for this IP address, or if the operation is not allowed/fails the original host name specified.
        Throws:
        java.net.UnknownHostException - the forward lookup of the specified address failed