public class StandardHost extends ContainerBase implements Host
ContainerBase.ContainerBackgroundProcessor, ContainerBase.PrivilegedAddChildLifecycle.SingleUseaccessLog, backgroundProcessorDelay, children, cluster, listeners, logger, logName, name, parent, parentClassLoader, pipeline, sm, startChildren, startStopExecutor, supportmserverADD_ALIAS_EVENT, REMOVE_ALIAS_EVENTADD_CHILD_EVENT, ADD_VALVE_EVENT, REMOVE_CHILD_EVENT, REMOVE_VALVE_EVENTAFTER_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 |
|---|
StandardHost()
Create a new StandardHost component with the default basic Valve.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAlias(java.lang.String alias)
Add an alias name that should be mapped to this same Host.
|
void |
addChild(Container child)
Add a child Container, only if the proposed child is an implementation
of Context.
|
java.lang.String[] |
findAliases() |
java.lang.String[] |
findReloadedContextMemoryLeaks()
Attempt to identify the contexts that have a class loader memory leak.
|
java.lang.String[] |
getAliases() |
java.lang.String |
getAppBase()
Return the application root for this Host.
|
java.io.File |
getAppBaseFile()
(
|
boolean |
getAutoDeploy() |
java.io.File |
getConfigBaseFile()
(
|
java.lang.String |
getConfigClass() |
java.lang.String |
getContextClass() |
boolean |
getCreateDirs()
Returns
true if the Host will attempt to create directories for appBase and xmlBase
unless they already exist. |
java.lang.String |
getDeployIgnore() |
java.util.regex.Pattern |
getDeployIgnorePattern() |
boolean |
getDeployOnStartup() |
java.lang.String |
getErrorReportValveClass() |
java.lang.String |
getName()
Return a name string (suitable for use by humans) that describes this
Container.
|
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.util.concurrent.ExecutorService |
getStartStopExecutor() |
boolean |
getUndeployOldVersions() |
java.lang.String[] |
getValveNames() |
java.lang.String |
getWorkDir() |
java.lang.String |
getXmlBase()
Return the XML root for this Host.
|
boolean |
isCopyXML() |
boolean |
isDeployXML() |
boolean |
isFailCtxIfServletStartFails() |
boolean |
isUnpackWARs() |
void |
removeAlias(java.lang.String alias)
Remove the specified alias name from the aliases for this Host.
|
void |
setAppBase(java.lang.String appBase)
Set the application root for this Host.
|
void |
setAutoDeploy(boolean autoDeploy)
Set the auto deploy flag value for this host.
|
void |
setConfigClass(java.lang.String configClass)
Set the Java class name of the context configuration class
for new web applications.
|
void |
setContextClass(java.lang.String contextClass)
Set the Java class name of the Context implementation class
for new web applications.
|
void |
setCopyXML(boolean copyXML)
Set the copy XML config file flag for this component.
|
void |
setCreateDirs(boolean createDirs)
Set to
true if the Host should attempt to create directories for xmlBase and appBase upon startup |
void |
setDeployIgnore(java.lang.String deployIgnore)
Set the regular expression that defines the files and directories in
the host's
getAppBase() that will be ignored by the automatic
deployment process. |
void |
setDeployOnStartup(boolean deployOnStartup)
Set the deploy on startup flag value for this host.
|
void |
setDeployXML(boolean deployXML)
Deploy XML Context config files flag mutator.
|
void |
setErrorReportValveClass(java.lang.String errorReportValveClass)
Set the Java class name of the error report valve class
for new web applications.
|
void |
setFailCtxIfServletStartFails(boolean failCtxIfServletStartFails)
Change the behavior of Servlet startup errors on web application starts.
|
void |
setName(java.lang.String name)
Set the canonical, fully qualified, name of the virtual host
this Container represents.
|
void |
setUndeployOldVersions(boolean undeployOldVersions)
Set to
true if the Host should automatically undeploy old versions of
applications deployed using parallel deployment. |
void |
setUnpackWARs(boolean unpackWARs)
Unpack WARs flag mutator.
|
void |
setWorkDir(java.lang.String workDir)
Set host work directory base.
|
void |
setXmlBase(java.lang.String xmlBase)
Set the Xml root for this Host.
|
protected void |
startInternal()
Start this component and implement the requirements
of
LifecycleBase.startInternal(). |
addContainerListener, addPropertyChangeListener, addValve, backgroundProcess, destroyInternal, findChild, findChildren, findContainerListeners, fireContainerEvent, getAccessLog, getBackgroundProcessorDelay, getCatalinaBase, getCatalinaHome, getChildren, getCluster, getClusterInternal, getDomainInternal, getLogger, getLogName, getMBeanKeyProperties, getParent, getParentClassLoader, getPipeline, getRealm, getRealmInternal, getStartChildren, getStartStopThreads, initInternal, logAccess, removeChild, removeContainerListener, removePropertyChangeListener, setBackgroundProcessorDelay, setCluster, setParent, setParentClassLoader, setRealm, setStartChildren, setStartStopThreads, stopInternal, threadStart, threadStop, toStringgetDomain, getObjectName, postDeregister, postRegister, preDeregister, preRegister, register, setDomain, unregisteraddLifecycleListener, destroy, findLifecycleListeners, fireLifecycleEvent, getState, getStateName, init, removeLifecycleListener, setState, setState, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddContainerListener, addPropertyChangeListener, backgroundProcess, findChild, findChildren, findContainerListeners, fireContainerEvent, getAccessLog, getBackgroundProcessorDelay, getCatalinaBase, getCatalinaHome, getCluster, getDomain, getLogger, getLogName, getMBeanKeyProperties, getObjectName, getParent, getParentClassLoader, getPipeline, getRealm, getStartStopThreads, logAccess, removeChild, removeContainerListener, removePropertyChangeListener, setBackgroundProcessorDelay, setCluster, setParent, setParentClassLoader, setRealm, setStartStopThreadsaddLifecycleListener, destroy, findLifecycleListeners, getState, getStateName, init, removeLifecycleListener, start, stoppublic StandardHost()
public boolean getUndeployOldVersions()
getUndeployOldVersions in interface Hosttrue of the Host is configured to automatically undeploy old
versions of applications deployed using parallel deployment. This only
takes effect is Host.getAutoDeploy() also returns true.public void setUndeployOldVersions(boolean undeployOldVersions)
Hosttrue if the Host should automatically undeploy old versions of
applications deployed using parallel deployment. This only takes effect
if Host.getAutoDeploy() returns true.setUndeployOldVersions in interface HostundeployOldVersions - The new value for this flagpublic java.util.concurrent.ExecutorService getStartStopExecutor()
getStartStopExecutor in interface Hostpublic java.lang.String getAppBase()
getAppBase in interface Hostpublic java.io.File getAppBaseFile()
getAppBaseFile in interface HostFile for the appBase of this Host. The file
will be canonical if possible. There is no guarantee that that the
appBase exists.public void setAppBase(java.lang.String appBase)
setAppBase in interface HostappBase - The new application rootpublic java.lang.String getXmlBase()
getXmlBase in interface Hostpublic void setXmlBase(java.lang.String xmlBase)
setXmlBase in interface HostxmlBase - The new XML rootpublic java.io.File getConfigBaseFile()
getConfigBaseFile in interface Hostpublic boolean getCreateDirs()
Hosttrue if the Host will attempt to create directories for appBase and xmlBase
unless they already exist.getCreateDirs in interface Hosttrue if the Host will attempt to create directories for appBase and xmlBase
unless they already exist.public void setCreateDirs(boolean createDirs)
true if the Host should attempt to create directories for xmlBase and appBase upon startupsetCreateDirs in interface HostcreateDirs - the new flag valuepublic boolean getAutoDeploy()
getAutoDeploy in interface Hostpublic void setAutoDeploy(boolean autoDeploy)
setAutoDeploy in interface HostautoDeploy - The new auto deploy flagpublic java.lang.String getConfigClass()
getConfigClass in interface Hostpublic void setConfigClass(java.lang.String configClass)
setConfigClass in interface HostconfigClass - The new context configuration classpublic java.lang.String getContextClass()
public void setContextClass(java.lang.String contextClass)
contextClass - The new context implementation classpublic boolean getDeployOnStartup()
getDeployOnStartup in interface Hosttrue, it indicates
that this host's child webapps should be discovered and automatically
deployed at startup time.public void setDeployOnStartup(boolean deployOnStartup)
setDeployOnStartup in interface HostdeployOnStartup - The new deploy on startup flagpublic boolean isDeployXML()
true if XML context descriptors should be deployed.public void setDeployXML(boolean deployXML)
deployXML - true if context descriptors should be deployedpublic boolean isCopyXML()
public void setCopyXML(boolean copyXML)
copyXML - The new copy XML flagpublic java.lang.String getErrorReportValveClass()
public void setErrorReportValveClass(java.lang.String errorReportValveClass)
errorReportValveClass - The new error report valve classpublic java.lang.String getName()
ContainerBasegetName in interface ContainergetName in class ContainerBasepublic void setName(java.lang.String name)
setName in interface ContainersetName in class ContainerBasename - Virtual host namejava.lang.IllegalArgumentException - if name is nullpublic boolean isUnpackWARs()
true if WARs should be unpacked on deployment.public void setUnpackWARs(boolean unpackWARs)
unpackWARs - true to unpack WARs on deploymentpublic java.lang.String getWorkDir()
public void setWorkDir(java.lang.String workDir)
workDir - the new base work folder for this hostpublic java.lang.String getDeployIgnore()
getDeployIgnore in interface HostgetAppBase() that will be ignored by the automatic
deployment process.public java.util.regex.Pattern getDeployIgnorePattern()
getDeployIgnorePattern in interface HostgetAppBase() that will be ignored by the
automatic deployment process.public void setDeployIgnore(java.lang.String deployIgnore)
getAppBase() that will be ignored by the automatic
deployment process.setDeployIgnore in interface HostdeployIgnore - the regexppublic boolean isFailCtxIfServletStartFails()
true if a webapp start should fail if a Servlet startup failspublic void setFailCtxIfServletStartFails(boolean failCtxIfServletStartFails)
failCtxIfServletStartFails - false to ignore errors on Servlets which
are stated when the web application startspublic void addAlias(java.lang.String alias)
public void addChild(Container child)
addChild in interface ContaineraddChild in class ContainerBasechild - Child container to be addedpublic java.lang.String[] findReloadedContextMemoryLeaks()
public java.lang.String[] findAliases()
findAliases in interface Hostpublic void removeAlias(java.lang.String alias)
removeAlias in interface Hostalias - Alias name to be removedprotected void startInternal()
throws LifecycleException
LifecycleBase.startInternal().startInternal in class ContainerBaseLifecycleException - if this component detects a fatal error
that prevents this component from being usedpublic java.lang.String[] getValveNames()
throws java.lang.Exception
java.lang.Exception - if an MBean cannot be created or registeredpublic java.lang.String[] getAliases()
protected java.lang.String getObjectNameKeyProperties()
LifecycleMBeanBaseObjectName that will be used to register this component.getObjectNameKeyProperties in class LifecycleMBeanBaseObjectNameCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.