public class StandardHost extends ContainerBase implements Host
ContainerBase.ContainerBackgroundProcessor, ContainerBase.PrivilegedAddChild
Lifecycle.SingleUse
accessLog, backgroundProcessorDelay, children, cluster, listeners, logger, logName, name, parent, parentClassLoader, pipeline, sm, startChildren, startStopExecutor, support
mserver
ADD_ALIAS_EVENT, REMOVE_ALIAS_EVENT
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 |
---|
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()
Return the set of alias names for this Host.
|
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()
(Return an absolute
File for the appBase of this Host. |
boolean |
getAutoDeploy()
Return the value of the auto deploy flag.
|
java.io.File |
getConfigBaseFile()
(Return a default configuration path of this Host.
|
java.lang.String |
getConfigClass()
Return the Java class name of the context configuration class
for new web applications.
|
java.lang.String |
getContextClass()
Return the Java class name of the Context implementation class
for new web applications.
|
boolean |
getCreateDirs()
Returns true if the Host will attempt to create directories for appBase and xmlBase
unless they already exist.
|
java.lang.String |
getDeployIgnore()
Return the regular expression that defines the files and directories in
the host's
getAppBase() that will be ignored by the automatic
deployment process. |
java.util.regex.Pattern |
getDeployIgnorePattern()
Return the compiled regular expression that defines the files and
directories in the host's
getAppBase() that will be ignored by the
automatic deployment process. |
boolean |
getDeployOnStartup()
Return the value of the deploy on startup flag.
|
java.lang.String |
getErrorReportValveClass()
Return the Java class name of the error report valve class
for new web applications.
|
java.lang.String |
getName()
Return the canonical, fully qualified, name of the virtual host
this Container represents.
|
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()
Return the executor that is used for starting and stopping contexts.
|
boolean |
getUndeployOldVersions()
Returns true of the Host is configured to automatically undeploy old
versions of applications deployed using parallel deployment.
|
java.lang.String[] |
getValveNames()
Return the MBean Names of the Valves associated with this Host
|
java.lang.String |
getWorkDir()
Host work directory base.
|
java.lang.String |
getXmlBase()
Return the XML root for this Host.
|
boolean |
isCopyXML()
Return the copy XML config file flag for this component.
|
boolean |
isDeployXML()
Deploy XML Context config files flag accessor.
|
boolean |
isFailCtxIfServletStartFails() |
boolean |
isUnpackWARs()
Unpack WARs flag accessor.
|
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) |
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)
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() . |
java.lang.String |
toString()
Return a String representation of this component.
|
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
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, getCatalinaBase, getCatalinaHome, getCluster, getDomain, getLogger, getLogName, getMBeanKeyProperties, getObjectName, getParent, getParentClassLoader, getPipeline, getRealm, getStartStopThreads, logAccess, removeChild, removeContainerListener, removePropertyChangeListener, setBackgroundProcessorDelay, setCluster, setParent, setParentClassLoader, setRealm, setStartStopThreads
addLifecycleListener, destroy, findLifecycleListeners, getState, getStateName, init, removeLifecycleListener, start, stop
public StandardHost()
public boolean getUndeployOldVersions()
Host
Host.getAutoDeploy()
also returns true.getUndeployOldVersions
in interface Host
public void setUndeployOldVersions(boolean undeployOldVersions)
Host
Host.getAutoDeploy()
returns true.setUndeployOldVersions
in interface Host
public java.util.concurrent.ExecutorService getStartStopExecutor()
Host
getStartStopExecutor
in interface Host
public java.lang.String getAppBase()
getAppBase
in interface Host
public java.io.File getAppBaseFile()
File
for the appBase of this Host. The file
will be canonical if possible. There is no guarantee that that the
appBase exists.getAppBaseFile
in interface Host
public void setAppBase(java.lang.String appBase)
setAppBase
in interface Host
appBase
- The new application rootpublic java.lang.String getXmlBase()
getXmlBase
in interface Host
public void setXmlBase(java.lang.String xmlBase)
setXmlBase
in interface Host
xmlBase
- The new XML rootpublic java.io.File getConfigBaseFile()
getConfigBaseFile
in interface Host
public boolean getCreateDirs()
getCreateDirs
in interface Host
public void setCreateDirs(boolean createDirs)
setCreateDirs
in interface Host
createDirs
- public boolean getAutoDeploy()
getAutoDeploy
in interface Host
public void setAutoDeploy(boolean autoDeploy)
setAutoDeploy
in interface Host
autoDeploy
- The new auto deploy flagpublic java.lang.String getConfigClass()
getConfigClass
in interface Host
public void setConfigClass(java.lang.String configClass)
setConfigClass
in interface Host
configClass
- 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 Host
public void setDeployOnStartup(boolean deployOnStartup)
setDeployOnStartup
in interface Host
deployOnStartup
- The new deploy on startup flagpublic boolean isDeployXML()
public void setDeployXML(boolean deployXML)
public 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()
getName
in interface Container
getName
in class ContainerBase
public void setName(java.lang.String name)
setName
in interface Container
setName
in class ContainerBase
name
- Virtual host namejava.lang.IllegalArgumentException
- if name is nullpublic boolean isUnpackWARs()
public void setUnpackWARs(boolean unpackWARs)
public java.lang.String getWorkDir()
public void setWorkDir(java.lang.String workDir)
public java.lang.String getDeployIgnore()
getAppBase()
that will be ignored by the automatic
deployment process.getDeployIgnore
in interface Host
public java.util.regex.Pattern getDeployIgnorePattern()
getAppBase()
that will be ignored by the
automatic deployment process.getDeployIgnorePattern
in interface Host
public void setDeployIgnore(java.lang.String deployIgnore)
getAppBase()
that will be ignored by the automatic
deployment process.setDeployIgnore
in interface Host
public boolean isFailCtxIfServletStartFails()
public void setFailCtxIfServletStartFails(boolean failCtxIfServletStartFails)
public void addAlias(java.lang.String alias)
public void addChild(Container child)
addChild
in interface Container
addChild
in class ContainerBase
child
- Child container to be addedpublic java.lang.String[] findReloadedContextMemoryLeaks()
public java.lang.String[] findAliases()
findAliases
in interface Host
public void removeAlias(java.lang.String alias)
removeAlias
in interface Host
alias
- Alias name to be removedpublic java.lang.String toString()
toString
in class java.lang.Object
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[] 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()
LifecycleMBeanBase
ObjectName
that will be used to register this component.getObjectNameKeyProperties
in class LifecycleMBeanBase
ObjectName
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.