public class ThreadPoolService
extends jadex.bridge.service.BasicService
implements jadex.bridge.service.types.threadpool.IThreadPoolService, jadex.bridge.service.types.threadpool.IDaemonThreadPoolService
Modifier and Type | Field and Description |
---|---|
protected jadex.commons.concurrent.IThreadPool |
threadpool
The threadpool.
|
Constructor and Description |
---|
ThreadPoolService(jadex.commons.concurrent.IThreadPool threadpool,
jadex.bridge.IComponentIdentifier provider)
Create a new threadpool service.
|
Modifier and Type | Method and Description |
---|---|
void |
addFinishListener(jadex.commons.IChangeListener<java.lang.Void> listener)
Add a finished listener.
|
void |
dispose()
Shutdown the thread pool.
|
void |
execute(java.lang.Runnable task)
Execute a task in its own thread.
|
boolean |
isRunning()
Test if the thread pool is running.
|
jadex.commons.future.IFuture<java.lang.Void> |
shutdownService()
Shutdown the service.
|
createServiceIdentifier, createServiceIdentifier, equals, generateServiceName, getInterfaceType, getInternalAccess, getMethodTimeout, getPropertyMap, getProviderId, getServiceIdentifier, hashCode, initNFProperties, isValid, setComponentAccess, setPropertyMap, startService, toString
public ThreadPoolService(jadex.commons.concurrent.IThreadPool threadpool, jadex.bridge.IComponentIdentifier provider)
public jadex.commons.future.IFuture<java.lang.Void> shutdownService()
shutdownService
in interface jadex.bridge.service.IInternalService
shutdownService
in class jadex.bridge.service.BasicService
public void execute(java.lang.Runnable task)
execute
in interface jadex.commons.concurrent.IThreadPool
task
- The task to execute.public void dispose()
dispose
in interface jadex.commons.concurrent.IThreadPool
public boolean isRunning()
isRunning
in interface jadex.commons.concurrent.IThreadPool
public void addFinishListener(jadex.commons.IChangeListener<java.lang.Void> listener)
addFinishListener
in interface jadex.commons.concurrent.IThreadPool