FileDocCategorySizeDatePackage
ThreadPoolManagerImpl.javaAPI DocJava SE 5 API4628Fri Aug 26 14:54:30 BST 2005com.sun.corba.se.impl.orbutil.threadpool

ThreadPoolManagerImpl

public class ThreadPoolManagerImpl extends Object implements com.sun.corba.se.spi.orbutil.threadpool.ThreadPoolManager

Fields Summary
private com.sun.corba.se.spi.orbutil.threadpool.ThreadPool
threadPool
Constructors Summary
public ThreadPoolManagerImpl(ThreadGroup tg)

	// Use unbounded threadpool in J2SE ORB
	// ThreadPoolManager from s1as appserver code base can be set in the
	// ORB. ThreadPools in the appserver are bounded. In that situation 
	// the ThreadPool in this ThreadPoolManager will have its threads 
	// die after the idle timeout.
	// XXX Should there be cleanup when ORB.shutdown is called if the
	// ORB owns the ThreadPool?
	threadPool = new ThreadPoolImpl( tg,
	    ORBConstants.THREADPOOL_DEFAULT_NAME ) ;
    
Methods Summary
public com.sun.corba.se.spi.orbutil.threadpool.ThreadPoolgetDefaultThreadPool()
Returns the first instance of ThreadPool in the ThreadPoolManager

        return threadPool;
    
public com.sun.corba.se.spi.orbutil.threadpool.ThreadPoolgetThreadPool(java.lang.String threadpoolId)
This method will return an instance of the threadpool given a threadpoolId, that can be used by any component in the app. server.

throws
NoSuchThreadPoolException thrown when invalid threadpoolId is passed as a parameter

            
        return threadPool;
    
public com.sun.corba.se.spi.orbutil.threadpool.ThreadPoolgetThreadPool(int numericIdForThreadpool)
This method will return an instance of the threadpool given a numeric threadpoolId. This method will be used by the ORB to support the functionality of dedicated threadpool for EJB beans

throws
NoSuchThreadPoolException thrown when invalidnumericIdForThreadpool is passed as a parameter

 

        return threadPool;
    
public com.sun.corba.se.spi.orbutil.threadpool.ThreadPoolChoosergetThreadPoolChooser(java.lang.String componentId)
Return an instance of ThreadPoolChooser based on the componentId that was passed as argument

	//FIXME: This method is not used, but should be fixed once
	//nio select starts working and we start using ThreadPoolChooser
	return null;
    
public com.sun.corba.se.spi.orbutil.threadpool.ThreadPoolChoosergetThreadPoolChooser(int componentIndex)
Return an instance of ThreadPoolChooser based on the componentIndex that was passed as argument. This is added for improved performance so that the caller does not have to pay the cost of computing hashcode for the componentId

	//FIXME: This method is not used, but should be fixed once
	//nio select starts working and we start using ThreadPoolChooser
	return null;
    
public intgetThreadPoolChooserNumericId(java.lang.String componentId)
Gets the numeric index associated with the componentId specified for a ThreadPoolChooser. This method would help the component call the more efficient implementation i.e. getThreadPoolChooser(int componentIndex)

	//FIXME: This method is not used, but should be fixed once
	//nio select starts working and we start using ThreadPoolChooser
	return 0;
    
public intgetThreadPoolNumericId(java.lang.String threadpoolId)
This method is used to return the numeric id of the threadpool, given a String threadpoolId. This is used by the POA interceptors to add the numeric threadpool Id, as a tagged component in the IOR. This is used to provide the functionality of dedicated threadpool for EJB beans

 
        return 0;
    
public java.lang.StringgetThreadPoolStringId(int numericIdForThreadpool)
Return a String Id for a numericId of a threadpool managed by the threadpool manager

       return "";
    
public voidsetThreadPoolChooser(java.lang.String componentId, com.sun.corba.se.spi.orbutil.threadpool.ThreadPoolChooser aThreadPoolChooser)
Sets a ThreadPoolChooser for a particular componentId in the ThreadPoolManager. This would enable any component to add a ThreadPoolChooser for their specific use

	//FIXME: This method is not used, but should be fixed once
	//nio select starts working and we start using ThreadPoolChooser