Class S1ASThreadPoolManager
- java.lang.Object
-
- org.glassfish.enterprise.iiop.util.S1ASThreadPoolManager
-
- All Implemented Interfaces:
com.sun.corba.ee.spi.threadpool.ThreadPoolManager,Closeable,AutoCloseable
public class S1ASThreadPoolManager extends Object implements com.sun.corba.ee.spi.threadpool.ThreadPoolManager
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()com.sun.corba.ee.spi.threadpool.ThreadPoolgetDefaultThreadPool()Returns the first instance of ThreadPool in the ThreadPoolManagercom.sun.corba.ee.spi.threadpool.ThreadPoolgetThreadPool(int numericIdForThreadpool)This method will return an instance of the threadpool given a numeric threadpoolId.com.sun.corba.ee.spi.threadpool.ThreadPoolgetThreadPool(String id)This method will return an instance of the threadpool given a threadpoolId, that can be used by any component in the app.com.sun.corba.ee.spi.threadpool.ThreadPoolChoosergetThreadPoolChooser(int componentIndex)Return an instance of ThreadPoolChooser based on the componentIndex that was passed as argument.com.sun.corba.ee.spi.threadpool.ThreadPoolChoosergetThreadPoolChooser(String componentId)Return an instance of ThreadPoolChooser based on the componentId that was passed as argumentintgetThreadPoolChooserNumericId(String componentId)Gets the numeric index associated with the componentId specified for a ThreadPoolChooser.static com.sun.corba.ee.spi.threadpool.ThreadPoolManagergetThreadPoolManager()intgetThreadPoolNumericId(String id)This method is used to return the numeric id of the threadpool, given a String threadpoolId.StringgetThreadPoolStringId(int numericIdForThreadpool)Return a String Id for a numericId of a threadpool managed by the threadpool managervoidsetThreadPoolChooser(String componentId, com.sun.corba.ee.spi.threadpool.ThreadPoolChooser aThreadPoolChooser)Sets a ThreadPoolChooser for a particular componentId in the ThreadPoolManager.
-
-
-
Method Detail
-
getThreadPoolManager
public static com.sun.corba.ee.spi.threadpool.ThreadPoolManager getThreadPoolManager()
-
getThreadPool
public com.sun.corba.ee.spi.threadpool.ThreadPool getThreadPool(String id) throws com.sun.corba.ee.spi.threadpool.NoSuchThreadPoolException
This method will return an instance of the threadpool given a threadpoolId, that can be used by any component in the app. server.- Specified by:
getThreadPoolin interfacecom.sun.corba.ee.spi.threadpool.ThreadPoolManager- Throws:
com.sun.corba.ee.spi.threadpool.NoSuchThreadPoolException- thrown when invalid threadpoolId is passed as a parameter
-
getThreadPool
public com.sun.corba.ee.spi.threadpool.ThreadPool getThreadPool(int numericIdForThreadpool) throws com.sun.corba.ee.spi.threadpool.NoSuchThreadPoolExceptionThis 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- Specified by:
getThreadPoolin interfacecom.sun.corba.ee.spi.threadpool.ThreadPoolManager- Throws:
com.sun.corba.ee.spi.threadpool.NoSuchThreadPoolException- thrown when invalidnumericIdForThreadpool is passed as a parameter
-
getThreadPoolNumericId
public int getThreadPoolNumericId(String id)
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- Specified by:
getThreadPoolNumericIdin interfacecom.sun.corba.ee.spi.threadpool.ThreadPoolManager
-
getThreadPoolStringId
public String getThreadPoolStringId(int numericIdForThreadpool)
Return a String Id for a numericId of a threadpool managed by the threadpool manager- Specified by:
getThreadPoolStringIdin interfacecom.sun.corba.ee.spi.threadpool.ThreadPoolManager
-
getDefaultThreadPool
public com.sun.corba.ee.spi.threadpool.ThreadPool getDefaultThreadPool()
Returns the first instance of ThreadPool in the ThreadPoolManager- Specified by:
getDefaultThreadPoolin interfacecom.sun.corba.ee.spi.threadpool.ThreadPoolManager
-
getThreadPoolChooser
public com.sun.corba.ee.spi.threadpool.ThreadPoolChooser getThreadPoolChooser(String componentId)
Return an instance of ThreadPoolChooser based on the componentId that was passed as argument- Specified by:
getThreadPoolChooserin interfacecom.sun.corba.ee.spi.threadpool.ThreadPoolManager
-
getThreadPoolChooser
public com.sun.corba.ee.spi.threadpool.ThreadPoolChooser getThreadPoolChooser(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- Specified by:
getThreadPoolChooserin interfacecom.sun.corba.ee.spi.threadpool.ThreadPoolManager
-
setThreadPoolChooser
public void setThreadPoolChooser(String componentId, com.sun.corba.ee.spi.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- Specified by:
setThreadPoolChooserin interfacecom.sun.corba.ee.spi.threadpool.ThreadPoolManager
-
getThreadPoolChooserNumericId
public int getThreadPoolChooserNumericId(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)- Specified by:
getThreadPoolChooserNumericIdin interfacecom.sun.corba.ee.spi.threadpool.ThreadPoolManager
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-