Package com.sas.iom.orb

# Class ExecutorServiceThreadPool

java.lang.Object
com.sas.iom.orb.ThreadPool
com.sas.iom.orb.ExecutorServiceThreadPool

public class ExecutorServiceThreadPool extends ThreadPool
ThreadPool implementation that wraps an ExecutorService.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ExecutorServiceThreadPool(java.util.concurrent.ExecutorService executor)`
  Construct an ExecutorServiceThreadPool.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `executeDaemon(WorkInterface work)`
  Execute a unit of work on an idle thread in the pool.
  `void`
  `term()`
  Release resources associated with the pool.

  ### Methods inherited from class com.sas.iom.orb.ThreadPool

  `addListener, executeStandard, finalize, removeListener`

  ### Methods inherited from class java.lang.Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ExecutorServiceThreadPool

    public ExecutorServiceThreadPool(java.util.concurrent.ExecutorService executor)
    Construct an ExecutorServiceThreadPool.
    Parameters:
      `executor` - the executor service to wrap

- ## Method Details

  - ### executeDaemon

    public void executeDaemon(WorkInterface work) throws WorkException
    Execute a unit of work on an idle thread in the pool. If all threads in the pool are busy, a new thread will be created.
    Overrides:
      `executeDaemon` in class `ThreadPool`
    Throws:
      `WorkException` - if the pool refuses to execute the work

  - ### term

    public void term()
    Release resources associated with the pool. Previously submitted work will be completed, but no new work will be accepted.
    Overrides:
      `term` in class `ThreadPool`