|
The im4java Library, Version 1.4.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.concurrent.AbstractExecutorService java.util.concurrent.ThreadPoolExecutor org.im4java.process.ProcessExecutor
public class ProcessExecutor
This class subclasses ThreadPoolExecutor and implements a pooling-service for threads running processes.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor |
---|
java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy |
Constructor Summary | |
---|---|
ProcessExecutor()
The default constructor creates a fixed-sized thread-pool with corePoolSize == maximumPoolSize. |
|
ProcessExecutor(int pProcs)
Create a ProcessExecutor with given number of threads for corePoolSize and maximumPoolSize. |
Method Summary | |
---|---|
protected void |
afterExecute(java.lang.Runnable r,
java.lang.Throwable t)
Deregister this ProcessExecutor as a ProcessEventListener . |
protected void |
beforeExecute(java.lang.Thread t,
java.lang.Runnable r)
Register this ProcessExecutor as a ProcessEventListener . |
void |
destroy()
Destroy all active processes. |
void |
processInitiated(ProcessEvent pEvent)
This method is called at process initiation. |
void |
processStarted(ProcessEvent pEvent)
This method is called at process startup. |
void |
processTerminated(ProcessEvent pEvent)
This method is called at normal or abnormal process termination. |
java.util.List<java.lang.Runnable> |
shutdownNow()
|
Methods inherited from class java.util.concurrent.ThreadPoolExecutor |
---|
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, execute, finalize, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, terminated |
Methods inherited from class java.util.concurrent.AbstractExecutorService |
---|
invokeAll, invokeAll, invokeAny, invokeAny, newTaskFor, newTaskFor, submit, submit, submit |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProcessExecutor()
public ProcessExecutor(int pProcs)
pProcs
- Number of concurrently executing processes.Method Detail |
---|
protected void beforeExecute(java.lang.Thread t, java.lang.Runnable r)
ProcessEventListener
.
beforeExecute
in class java.util.concurrent.ThreadPoolExecutor
protected void afterExecute(java.lang.Runnable r, java.lang.Throwable t)
ProcessEventListener
.
afterExecute
in class java.util.concurrent.ThreadPoolExecutor
public void processInitiated(ProcessEvent pEvent)
processInitiated
in interface ProcessEventListener
public void processStarted(ProcessEvent pEvent)
processStarted
in interface ProcessEventListener
public void processTerminated(ProcessEvent pEvent)
processTerminated
in interface ProcessEventListener
public java.util.List<java.lang.Runnable> shutdownNow()
shutdownNow
in interface java.util.concurrent.ExecutorService
shutdownNow
in class java.util.concurrent.ThreadPoolExecutor
public void destroy()
|
The im4java Library, Version 1.4.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |