org.jwarp.service.threadpool
Class ThreadPoolService
java.lang.Object
|
+--org.jwarp.service.AService
|
+--org.jwarp.service.threadpool.ThreadPoolService
- All Implemented Interfaces:
- IConfigurable, IExceptionProvider, IReferenceable, IService, IThreadPoolService
- public class ThreadPoolService
- extends AService
- implements IThreadPoolService
Interface for the thread pool service.
|
Field Summary |
(package private) java.util.Hashtable |
pools
|
| Fields inherited from class org.jwarp.service.AService |
context, createdDate, dependencies, emptyProperties, exceptionListeners, log, resumedDate, serviceName, serviceStatus, serviceType, startedDate, stoppedDate, suspendedDate, systemTicket |
|
Method Summary |
void |
configure(org.jdom.Element config)
Pass the Configuration to the Configurable
class. |
IThreadPool |
createPool(java.lang.String name,
int maxThreads,
int initPoolSize,
ITicket user)
Add a server listener to listen to the server's activities. |
IThreadPool |
getPool(java.lang.String poolName,
ITicket user)
Gets a pool. |
java.util.Iterator |
getPoolNames()
This lists all security context's names. |
void |
removePool(java.lang.String poolName,
ITicket user)
Removes a pool. |
| Methods inherited from class org.jwarp.service.AService |
addExceptionListener, checkContext, createLogFromXML, getContext, getCreationDate, getDependencies, getExceptionListeners, getLog, getLogLevel, getName, getReference, getResumedDate, getShutDownDate, getStartDate, getStatus, getSuspendedDate, getType, removeAllExceptionListeners, removeExceptionListener, resume, sendExceptionEvent, setContext, setDependencies, setLogLevel, setName, shutdown, start, suspend |
| Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jwarp.service.IService |
checkContext, getDependencies, getLogLevel, getName, getStatus, getType, resume, setContext, setDependencies, setLogLevel, shutdown, start, suspend |
pools
java.util.Hashtable pools
ThreadPoolService
public ThreadPoolService()
configure
public void configure(org.jdom.Element config)
throws ConfigurationException
- Description copied from interface:
IConfigurable
- Pass the
Configuration to the Configurable
class. This method must always be called after the constructor and before any other method.
- Specified by:
configure in interface IConfigurable- Overrides:
configure in class AService
- Following copied from interface:
org.jwarp.service.configuration.IConfigurable
- Parameters:
configuration - the class configurations.
getPoolNames
public java.util.Iterator getPoolNames()
- This lists all security context's names.
- Specified by:
getPoolNames in interface IThreadPoolService
- Returns:
- The names of all registered security contexts.
createPool
public IThreadPool createPool(java.lang.String name,
int maxThreads,
int initPoolSize,
ITicket user)
throws java.lang.SecurityException
- Add a server listener to listen to the server's activities.
- Specified by:
createPool in interface IThreadPoolService
removePool
public void removePool(java.lang.String poolName,
ITicket user)
throws NotFoundException,
NotAvailableException,
java.lang.SecurityException
- Removes a pool.
- Specified by:
removePool in interface IThreadPoolService
- Throws:
NotFoundException - If the requested pool could not be foundNotAvailableException - If the requested pool is still runningjava.lang.SecurityException - If access id denied
getPool
public IThreadPool getPool(java.lang.String poolName,
ITicket user)
throws java.lang.SecurityException
- Gets a pool.
- Specified by:
getPool in interface IThreadPoolService
- Parameters:
pool - The pool's nameuser - The user ticket- Throws:
NotFoundException - If the requested pool could not be foundjava.lang.SecurityException - If access id denied