Class StandardEngine
java.lang.Object
org.apache.catalina.util.LifecycleBase
org.apache.catalina.util.LifecycleMBeanBase
org.apache.catalina.core.ContainerBase
org.apache.catalina.core.StandardEngine
- All Implemented Interfaces:
- MBeanRegistration,- Container,- Engine,- JmxEnabled,- Lifecycle
Standard implementation of the Engine interface. Each child container must be a Host implementation to process
 the specific fully qualified host name of that virtual host.
- Author:
- Craig R. McClanahan
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionprotected static final classprotected static final classNested classes/interfaces inherited from class org.apache.catalina.core.ContainerBaseContainerBase.ContainerBackgroundProcessor, ContainerBase.ContainerBackgroundProcessorMonitor, ContainerBase.PrivilegedAddChildNested classes/interfaces inherited from interface org.apache.catalina.LifecycleLifecycle.SingleUse
- 
Field SummaryFields inherited from class org.apache.catalina.core.ContainerBaseaccessLog, backgroundProcessorDelay, backgroundProcessorFuture, children, cluster, listeners, logger, logName, monitorFuture, name, parent, parentClassLoader, pipeline, sm, startChildren, startStopExecutor, supportFields inherited from interface org.apache.catalina.ContainerADD_CHILD_EVENT, ADD_VALVE_EVENT, REMOVE_CHILD_EVENT, REMOVE_VALVE_EVENTFields inherited from interface org.apache.catalina.LifecycleAFTER_DESTROY_EVENT, AFTER_INIT_EVENT, AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_DESTROY_EVENT, BEFORE_INIT_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, CONFIGURE_START_EVENT, CONFIGURE_STOP_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT
- 
Constructor SummaryConstructorsConstructorDescriptionCreate a new StandardEngine component with the default basic Valve.
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdd a new child Container to those associated with this Container, if supported.Obtain the location of CATALINA_BASE.Obtain the location of CATALINA_HOME.protected StringMethod implemented by sub-classes to identify the domain in which MBeans should be registered.protected StringAllow sub-classes to specify the key properties component of theObjectNamethat will be used to register this component.Get the parent class loader.getRealm()Obtain the Realm with which this Container is associated.protected voidSub-classes implement this method to perform any instance initialisation required.voidLog a request/response that was destined for this container but has been handled earlier in the processing chain so that the request/response still appears in the correct access logs.voidsetDefaultHost(String host) Set the default hostname for this Engine.voidsetJvmRoute(String routeId) Set the JvmRouteId for this engine.voidDisallow any attempt to set a parent for this Container, since an Engine is supposed to be at the top of the Container hierarchy.voidsetService(Service service) Set theServicewith which we are associated (if any).protected voidStart this component and implement the requirements ofLifecycleBase.startInternal().Methods inherited from class org.apache.catalina.core.ContainerBaseaddContainerListener, addPropertyChangeListener, addValve, backgroundProcess, destroyInternal, findChild, findChildren, findContainerListeners, fireContainerEvent, getAccessLog, getBackgroundProcessorDelay, getChildren, getCluster, getClusterInternal, getLogger, getLogName, getMBeanKeyProperties, getName, getParent, getPipeline, getRealmInternal, getStartChildren, getStartStopThreads, removeChild, removeContainerListener, removePropertyChangeListener, setBackgroundProcessorDelay, setCluster, setName, setParentClassLoader, setRealm, setStartChildren, setStartStopThreads, stopInternal, threadStart, threadStop, toStringMethods inherited from class org.apache.catalina.util.LifecycleMBeanBasegetDomain, getObjectName, postDeregister, postRegister, preDeregister, preRegister, register, setDomain, unregister, unregisterMethods inherited from class org.apache.catalina.util.LifecycleBaseaddLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, getThrowOnFailure, init, removeLifecycleListener, setState, setState, setThrowOnFailure, start, stopMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.catalina.ContaineraddContainerListener, addPropertyChangeListener, backgroundProcess, findChild, findChildren, findContainerListeners, fireContainerEvent, getAccessLog, getBackgroundProcessorDelay, getCluster, getDomain, getLogger, getLogName, getMBeanKeyProperties, getName, getObjectName, getParent, getPipeline, getStartStopThreads, removeChild, removeContainerListener, removePropertyChangeListener, setBackgroundProcessorDelay, setCluster, setName, setParentClassLoader, setRealm, setStartStopThreadsMethods inherited from interface org.apache.catalina.LifecycleaddLifecycleListener, destroy, findLifecycleListeners, getState, getStateName, init, removeLifecycleListener, start, stop
- 
Constructor Details- 
StandardEnginepublic StandardEngine()Create a new StandardEngine component with the default basic Valve.
 
- 
- 
Method Details- 
getRealmDescription copied from interface:ContainerObtain the Realm with which this Container is associated.- Specified by:
- getRealmin interface- Container
- Overrides:
- getRealmin class- ContainerBase
- Returns:
- The associated Realm; if there is no associated Realm, the Realm associated with the parent Container (if
             any); otherwise return null.
 
- 
getDefaultHost- Specified by:
- getDefaultHostin interface- Engine
- Returns:
- the default host name for this Engine.
 
- 
setDefaultHostDescription copied from interface:EngineSet the default hostname for this Engine.- Specified by:
- setDefaultHostin interface- Engine
- Parameters:
- host- The new default host
 
- 
setJvmRouteDescription copied from interface:EngineSet the JvmRouteId for this engine.- Specified by:
- setJvmRoutein interface- Engine
- Parameters:
- routeId- the (new) JVM Route ID. Each Engine within a cluster must have a unique JVM Route ID.
 
- 
getJvmRoute- Specified by:
- getJvmRoutein interface- Engine
- Returns:
- the JvmRouteId for this engine.
 
- 
getService- Specified by:
- getServicein interface- Engine
- Returns:
- the Servicewith which we are associated (if any).
 
- 
setServiceDescription copied from interface:EngineSet theServicewith which we are associated (if any).- Specified by:
- setServicein interface- Engine
- Parameters:
- service- The service that owns this Engine
 
- 
addChildAdd a new child Container to those associated with this Container, if supported. Prior to adding this Container to the set of children, the child'ssetParent()method must be called, with this Container as an argument. This method may thrown anIllegalArgumentExceptionif this Container chooses not to be attached to the specified Container, in which case it is not addedThe child must be an implementation of Host.- Specified by:
- addChildin interface- Container
- Overrides:
- addChildin class- ContainerBase
- Parameters:
- child- New child Container to be added
 
- 
setParentDisallow any attempt to set a parent for this Container, since an Engine is supposed to be at the top of the Container hierarchy.- Specified by:
- setParentin interface- Container
- Overrides:
- setParentin class- ContainerBase
- Parameters:
- container- Proposed parent Container
 
- 
initInternalDescription copied from class:LifecycleBaseSub-classes implement this method to perform any instance initialisation required.- Overrides:
- initInternalin class- LifecycleMBeanBase
- Throws:
- LifecycleException- If the initialisation fails
 
- 
startInternalDescription copied from class:ContainerBaseStart this component and implement the requirements ofLifecycleBase.startInternal().- Overrides:
- startInternalin class- ContainerBase
- Throws:
- LifecycleException- if this component detects a fatal error that prevents this component from being used
 
- 
logAccessLog a request/response that was destined for this container but has been handled earlier in the processing chain so that the request/response still appears in the correct access logs.Override the default implementation. If no access log is defined for the Engine, look for one in the Engine's default host and then the default host's ROOT context. If still none is found, return the default NoOp access log. - Specified by:
- logAccessin interface- Container
- Overrides:
- logAccessin class- ContainerBase
- Parameters:
- request- Request (associated with the response) to log
- response- Response (associated with the request) to log
- time- Time taken to process the request/response in milliseconds (use 0 if not known)
- useDefault- Flag that indicates that the request/response should be logged in the engine's default access log
 
- 
getParentClassLoaderDescription copied from interface:ContainerGet the parent class loader.- Specified by:
- getParentClassLoaderin interface- Container
- Overrides:
- getParentClassLoaderin class- ContainerBase
- Returns:
- the parent class loader for this component. If not set, return
             Container.getParent().Container.getParentClassLoader(). If no parent has been set, return the system class loader.
 
- 
getCatalinaBaseDescription copied from interface:ContainerObtain the location of CATALINA_BASE.- Specified by:
- getCatalinaBasein interface- Container
- Overrides:
- getCatalinaBasein class- ContainerBase
- Returns:
- The location of CATALINA_BASE.
 
- 
getCatalinaHomeDescription copied from interface:ContainerObtain the location of CATALINA_HOME.- Specified by:
- getCatalinaHomein interface- Container
- Overrides:
- getCatalinaHomein class- ContainerBase
- Returns:
- The location of CATALINA_HOME.
 
- 
getObjectNameKeyPropertiesDescription copied from class:LifecycleMBeanBaseAllow sub-classes to specify the key properties component of theObjectNamethat will be used to register this component.- Specified by:
- getObjectNameKeyPropertiesin class- LifecycleMBeanBase
- Returns:
- The string representation of the key properties component of the desired ObjectName
 
- 
getDomainInternalDescription copied from class:LifecycleMBeanBaseMethod implemented by sub-classes to identify the domain in which MBeans should be registered.- Overrides:
- getDomainInternalin class- ContainerBase
- Returns:
- The name of the domain to use to register MBeans.
 
 
-