## org.apache.catalina.core
Class StandardThreadExecutor

    java.lang.Object
      org.apache.catalina.core.StandardThreadExecutor

All Implemented Interfaces:
  java.util.concurrent.Executor, Lifecycle

    public class StandardThreadExecutor

extends java.lang.Object
implements Executor

Field Summary
`protected boolean` `daemon`
`protected java.util.concurrent.ThreadPoolExecutor` `executor`
`protected int` `maxIdleTime`
`protected int` `maxThreads`
`protected int` `minSpareThreads`
`protected java.lang.String` `name`
`protected java.lang.String` `namePrefix`
`protected int` `threadPriority`

Fields inherited from interface org.apache.catalina.Lifecycle
`AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, DESTROY_EVENT, INIT_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT`

Constructor Summary
`StandardThreadExecutor()`

Method Summary
`void` `addLifecycleListener(LifecycleListener listener)` Add a LifecycleEvent listener to this component.
`void` `execute(java.lang.Runnable command)`
`LifecycleListener[]` `findLifecycleListeners()` Get the lifecycle listeners associated with this lifecycle.
`int` `getActiveCount()`
`long` `getCompletedTaskCount()`
`int` `getCorePoolSize()`
`int` `getLargestPoolSize()`
`int` `getMaxIdleTime()`
`int` `getMaxThreads()`
`int` `getMinSpareThreads()`
`java.lang.String` `getName()`
`java.lang.String` `getNamePrefix()`
`int` `getPoolSize()`
`int` `getQueueSize()`
`int` `getThreadPriority()`
`boolean` `isDaemon()`
`void` `removeLifecycleListener(LifecycleListener listener)` Remove a LifecycleEvent listener from this component.
`void` `setDaemon(boolean daemon)`
`void` `setMaxIdleTime(int maxIdleTime)`
`void` `setMaxThreads(int maxThreads)`
`void` `setMinSpareThreads(int minSpareThreads)`
`void` `setName(java.lang.String name)`
`void` `setNamePrefix(java.lang.String namePrefix)`
`void` `setThreadPriority(int threadPriority)`
`void` `start()` Prepare for the beginning of active use of the public methods of this component.
`void` `stop()` Gracefully terminate the active use of the public methods of this component.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### threadPriority

    protected int threadPriority

### daemon

    protected boolean daemon

### namePrefix

    protected java.lang.String namePrefix

### maxThreads

    protected int maxThreads

### minSpareThreads

    protected int minSpareThreads

### maxIdleTime

    protected int maxIdleTime

### executor

    protected java.util.concurrent.ThreadPoolExecutor executor

### name

    protected java.lang.String name

Constructor Detail

### StandardThreadExecutor

    public StandardThreadExecutor()

Method Detail

### start

    public void start()
               throws LifecycleException

  Description copied from interface: `Lifecycle`
  Prepare for the beginning of active use of the public methods of this component. This method should be called before any of the public methods of this component are utilized. It should also send a LifecycleEvent of type START_EVENT to any registered listeners.

  Specified by:
    `start` in interface `Lifecycle`
  Throws:
    `LifecycleException` - if this component detects a fatal error that prevents this component from being used

### stop

    public void stop()
              throws LifecycleException

  Description copied from interface: `Lifecycle`
  Gracefully terminate the active use of the public methods of this component. This method should be the last one called on a given instance of this component. It should also send a LifecycleEvent of type STOP_EVENT to any registered listeners.

  Specified by:
    `stop` in interface `Lifecycle`
  Throws:
    `LifecycleException` - if this component detects a fatal error that needs to be reported

### execute

    public void execute(java.lang.Runnable command)

  Specified by:
    `execute` in interface `java.util.concurrent.Executor`

### getThreadPriority

    public int getThreadPriority()

### isDaemon

    public boolean isDaemon()

### getNamePrefix

    public java.lang.String getNamePrefix()

### getMaxIdleTime

    public int getMaxIdleTime()

### getMaxThreads

    public int getMaxThreads()

### getMinSpareThreads

    public int getMinSpareThreads()

### getName

    public java.lang.String getName()

### setThreadPriority

    public void setThreadPriority(int threadPriority)

### setDaemon

    public void setDaemon(boolean daemon)

### setNamePrefix

    public void setNamePrefix(java.lang.String namePrefix)

### setMaxIdleTime

    public void setMaxIdleTime(int maxIdleTime)

### setMaxThreads

    public void setMaxThreads(int maxThreads)

### setMinSpareThreads

    public void setMinSpareThreads(int minSpareThreads)

### setName

    public void setName(java.lang.String name)

### addLifecycleListener

    public void addLifecycleListener(LifecycleListener listener)

  Add a LifecycleEvent listener to this component.

  Specified by:
    `addLifecycleListener` in interface `Lifecycle`
  Parameters:
    `listener` - The listener to add

### findLifecycleListeners

    public LifecycleListener[] findLifecycleListeners()

  Get the lifecycle listeners associated with this lifecycle. If this Lifecycle has no listeners registered, a zero-length array is returned.

  Specified by:
    `findLifecycleListeners` in interface `Lifecycle`

### removeLifecycleListener

    public void removeLifecycleListener(LifecycleListener listener)

  Remove a LifecycleEvent listener from this component.

  Specified by:
    `removeLifecycleListener` in interface `Lifecycle`
  Parameters:
    `listener` - The listener to remove

### getActiveCount

    public int getActiveCount()

### getCompletedTaskCount

    public long getCompletedTaskCount()

### getCorePoolSize

    public int getCorePoolSize()

### getLargestPoolSize

    public int getLargestPoolSize()

### getPoolSize

    public int getPoolSize()

### getQueueSize

    public int getQueueSize()

Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.