FileDocCategorySizeDatePackage
AEThread.javaAPI DocAzureus 3.0.3.42136Mon Mar 13 13:06:52 GMT 2006org.gudy.azureus2.core3.util

AEThread

public abstract class AEThread extends Thread
author
parg

Fields Summary
private static WeakHashMap
our_thread_map
Constructors Summary
public AEThread(String name)

		
	
	
			 
	
		super(name);
		
		setDaemon( false );
	
public AEThread(String name, boolean daemon)

		super(name);
		
		setDaemon( daemon );
	
Methods Summary
public static booleanisOurThread(java.lang.Thread thread)

		if ( thread instanceof AEThread ){
			
			return( true );
		}
		
		synchronized( our_thread_map ){
			
			return( our_thread_map.get( thread ) != null );
		}
	
public voidrun()

		try{
			/*
			if ( !isDaemon()){
				
				System.out.println( "non-daemon thread:" + this );
			}
			*/
			
			runSupport();
			
		}catch( Throwable e ){
			
			DebugLight.printStackTrace(e);
		}
	
public abstract voidrunSupport()

public static voidsetOurThread()

		setOurThread( Thread.currentThread());
	
public static voidsetOurThread(java.lang.Thread thread)

		if ( thread instanceof AEThread ){
			
			return;
		}
				
		synchronized( our_thread_map ){
			
			our_thread_map.put( thread, "" );
		}