org.italiangrid.voms.ac.impl
Class DefaultLocalHostnameResolver

java.lang.Object
  extended by org.italiangrid.voms.ac.impl.DefaultLocalHostnameResolver
All Implemented Interfaces:
LocalHostnameResolver

public class DefaultLocalHostnameResolver
extends Object
implements LocalHostnameResolver

The default implementation for localhost name resolver. The localhost name is resolved using the following code:

 InetAddress.getLocalHost().getCanonicalHostName();
 
 


Constructor Summary
DefaultLocalHostnameResolver()
           
 
Method Summary
 String resolveLocalHostname()
          Resolves the hostname for localhost
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLocalHostnameResolver

public DefaultLocalHostnameResolver()
Method Detail

resolveLocalHostname

public String resolveLocalHostname()
                            throws 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:
UnknownHostException - when there is an error resolving the hostname


Copyright © 2013. All Rights Reserved.