FileDocCategorySizeDatePackage
UnresolvableHostManager.javaAPI DocAzureus 3.0.3.42202Thu Feb 09 19:42:44 GMT 2006org.gudy.azureus2.core3.util

UnresolvableHostManager

public class UnresolvableHostManager extends Object
author
parg

Fields Summary
protected static int
next_address
protected static Map
host_map
Constructors Summary
Methods Summary
public static intgetPseudoAddress(java.lang.String str)

	
	  
	
				 
	
		synchronized( host_map ){
			
			Integer	res = (Integer)host_map.get(str);
		
			if ( res == null ){
			
				res = new Integer( next_address++ );
				
				if (Logger.isEnabled())
					Logger.log(new LogEvent(LogIDs.NET, "Allocated pseudo IP address '"
							+ Integer.toHexString(res.intValue()) + "' for host '" + str
							+ "'"));
				
				host_map.put( str, res );
			}
		
			return( res.intValue());
		}
	
public static booleanisPseudoAddress(java.lang.String str)

		synchronized( host_map ){

			return( host_map.get(str) != null );
		}