public class StandardEngine extends ContainerBase implements Engine
Modifier and Type | Class and Description |
---|---|
protected static class |
StandardEngine.AccessLogListener |
protected static class |
StandardEngine.NoopAccessLog |
ContainerBase.ContainerBackgroundProcessor, ContainerBase.PrivilegedAddChild
Lifecycle.SingleUse
accessLog, backgroundProcessorDelay, children, cluster, listeners, logger, logName, name, parent, parentClassLoader, pipeline, sm, startChildren, startStopExecutor, support
mserver
ADD_CHILD_EVENT, ADD_VALVE_EVENT, REMOVE_CHILD_EVENT, REMOVE_VALVE_EVENT
AFTER_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 and Description |
---|
StandardEngine()
Create a new StandardEngine component with the default basic Valve.
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(Container child)
Add a child Container, only if the proposed child is an implementation
of Host.
|
java.io.File |
getCatalinaBase()
Obtain the location of CATALINA_BASE.
|
java.io.File |
getCatalinaHome()
Obtain the location of CATALINA_HOME.
|
java.lang.String |
getDefaultHost()
Return the default host.
|
protected java.lang.String |
getDomainInternal()
Method implemented by sub-classes to identify the domain in which MBeans
should be registered.
|
java.lang.String |
getJvmRoute()
Retrieve the cluster-wide unique identifier for this Engine.
|
protected java.lang.String |
getObjectNameKeyProperties()
Allow sub-classes to specify the key properties component of the
ObjectName that will be used to register this component. |
java.lang.ClassLoader |
getParentClassLoader()
Return the parent class loader for this component.
|
Realm |
getRealm()
Obtain the configured Realm and provide a default Realm implementation
when no explicit configuration is set.
|
Service |
getService()
Return the
Service with which we are associated (if any). |
protected void |
initInternal()
Sub-classes wishing to perform additional initialization should override
this method, ensuring that super.initInternal() is the first call in the
overriding method.
|
void |
logAccess(Request request,
Response response,
long time,
boolean useDefault)
Override the default implementation.
|
void |
setDefaultHost(java.lang.String host)
Set the default host.
|
void |
setJvmRoute(java.lang.String routeId)
Set the cluster-wide unique identifier for this Engine.
|
void |
setParent(Container container)
Disallow any attempt to set a parent for this Container, since an
Engine is supposed to be at the top of the Container hierarchy.
|
void |
setService(Service service)
Set the
Service with which we are associated (if any). |
protected void |
startInternal()
Start this component and implement the requirements
of
LifecycleBase.startInternal() . |
java.lang.String |
toString()
Return a String representation of this component.
|
addContainerListener, 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
getDomain, getObjectName, postDeregister, postRegister, preDeregister, preRegister, register, setDomain, unregister
addLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, init, removeLifecycleListener, setState, setState, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addContainerListener, 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, setStartStopThreads
addLifecycleListener, destroy, findLifecycleListeners, getState, getStateName, init, removeLifecycleListener, start, stop
public StandardEngine()
public Realm getRealm()
getRealm
in interface Container
getRealm
in class ContainerBase
NullRealm
by defaultpublic java.lang.String getDefaultHost()
getDefaultHost
in interface Engine
public void setDefaultHost(java.lang.String host)
setDefaultHost
in interface Engine
host
- The new default hostpublic void setJvmRoute(java.lang.String routeId)
This property should not be changed once it is set.
setJvmRoute
in interface Engine
routeId
- the (new) JVM Route ID. Each Engine within a cluster
must have a unique JVM Route ID.public java.lang.String getJvmRoute()
getJvmRoute
in interface Engine
public Service getService()
Service
with which we are associated (if any).getService
in interface Engine
public void setService(Service service)
Service
with which we are associated (if any).setService
in interface Engine
service
- The service that owns this Enginepublic void addChild(Container child)
addChild
in interface Container
addChild
in class ContainerBase
child
- Child container to be addedpublic void setParent(Container container)
setParent
in interface Container
setParent
in class ContainerBase
container
- Proposed parent Containerprotected void initInternal() throws LifecycleException
LifecycleMBeanBase
initInternal
in class ContainerBase
LifecycleException
protected void startInternal() throws LifecycleException
LifecycleBase.startInternal()
.startInternal
in class ContainerBase
LifecycleException
- if this component detects a fatal error
that prevents this component from being usedpublic java.lang.String toString()
toString
in class java.lang.Object
public void logAccess(Request request, Response response, long time, boolean useDefault)
logAccess
in interface Container
logAccess
in class ContainerBase
request
- Request (associated with the response) to logresponse
- Response (associated with the request) to logtime
- 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 logpublic java.lang.ClassLoader getParentClassLoader()
getParentClassLoader
in interface Container
getParentClassLoader
in class ContainerBase
Container.getParent()
.Container.getParentClassLoader()
. If no
parent has been set, return the system class loader.public java.io.File getCatalinaBase()
Container
getCatalinaBase
in interface Container
getCatalinaBase
in class ContainerBase
public java.io.File getCatalinaHome()
Container
getCatalinaHome
in interface Container
getCatalinaHome
in class ContainerBase
protected java.lang.String getObjectNameKeyProperties()
LifecycleMBeanBase
ObjectName
that will be used to register this component.getObjectNameKeyProperties
in class LifecycleMBeanBase
ObjectName
protected java.lang.String getDomainInternal()
LifecycleMBeanBase
getDomainInternal
in class ContainerBase
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.