use of org.apache.catalina.Executor in project tomcat by apache.
the class StandardService method initInternal.
/**
* Invoke a pre-startup initialization. This is used to allow connectors
* to bind to restricted ports under Unix operating environments.
*/
@Override
protected void initInternal() throws LifecycleException {
super.initInternal();
if (engine != null) {
engine.init();
}
// Initialize any Executors
for (Executor executor : findExecutors()) {
if (executor instanceof JmxEnabled) {
((JmxEnabled) executor).setDomain(getDomain());
}
executor.init();
}
// Initialize mapper listener
mapperListener.init();
// Initialize our defined Connectors
synchronized (connectorsLock) {
for (Connector connector : connectors) {
connector.init();
}
}
}
use of org.apache.catalina.Executor in project tomcat by apache.
the class StandardService method startInternal.
/**
* Start nested components ({@link Executor}s, {@link Connector}s and
* {@link Container}s) and implement the requirements of
* {@link org.apache.catalina.util.LifecycleBase#startInternal()}.
*
* @exception LifecycleException if this component detects a fatal error
* that prevents this component from being used
*/
@Override
protected void startInternal() throws LifecycleException {
if (log.isInfoEnabled())
log.info(sm.getString("standardService.start.name", this.name));
setState(LifecycleState.STARTING);
// Start our defined Container first
if (engine != null) {
synchronized (engine) {
engine.start();
}
}
synchronized (executors) {
for (Executor executor : executors) {
executor.start();
}
}
mapperListener.start();
// Start our defined Connectors second
synchronized (connectorsLock) {
for (Connector connector : connectors) {
// If it has already failed, don't try and start it
if (connector.getState() != LifecycleState.FAILED) {
connector.start();
}
}
}
}
use of org.apache.catalina.Executor in project tomcat by apache.
the class StandardService method destroyInternal.
@Override
protected void destroyInternal() throws LifecycleException {
mapperListener.destroy();
// Destroy our defined Connectors
synchronized (connectorsLock) {
for (Connector connector : connectors) {
connector.destroy();
}
}
// Destroy any Executors
for (Executor executor : findExecutors()) {
executor.destroy();
}
if (engine != null) {
engine.destroy();
}
super.destroyInternal();
}
Aggregations