Strategy to create thread pools.
This manager is pluggable so you can plugin a custom provider, for example if you want to leverage the WorkManager for a JEE server.
You may want to just implement a custom {@link ThreadPoolFactory} and rely on the{@link org.apache.camel.impl.DefaultExecutorServiceManager}, if that is sufficient. The {@link ThreadPoolFactory}is always used for creating the actual thread pools. You can implement a custom {@link ThreadPoolFactory}to leverage the WorkManager for a JEE server.
The {@link ThreadPoolFactory} has pure JDK API, where as this {@link ExecutorServiceManager} has Camel APIconcepts such as {@link ThreadPoolProfile}. Therefore it may be easier to only implement a custom {@link ThreadPoolFactory}.
This manager has fine grained methods for creating various thread pools, however custom strategies do not have to exactly create those kind of pools. Feel free to return a shared or different kind of pool.
If you use the
newXXX methods to create thread pools, then Camel will by default take care of shutting down those created pools when {@link org.apache.camel.CamelContext} is shutting down.
@see ThreadPoolFactory