Class DefaultLocalHostnameResolver

  • All Implemented Interfaces:
    LocalHostnameResolver

    public class DefaultLocalHostnameResolver
    extends java.lang.Object
    implements LocalHostnameResolver
    The default implementation for localhost name resolver. The localhost name is resolved using the following code:
     
     		InetAddress.getLocalHost().getCanonicalHostName();
     
     
    • Constructor Detail

      • DefaultLocalHostnameResolver

        public DefaultLocalHostnameResolver()
    • Method Detail

      • resolveLocalHostname

        public java.lang.String resolveLocalHostname()
                                              throws java.net.UnknownHostException
        Description copied from interface: LocalHostnameResolver
        Resolves the hostname for localhost
        Specified by:
        resolveLocalHostname in interface LocalHostnameResolver
        Returns:
        a String containing the localhost hostname
        Throws:
        java.net.UnknownHostException - when there is an error resolving the hostname