public class StandardHost extends ContainerBase implements Host
ContainerBase.ContainerBackgroundProcessor, ContainerBase.PrivilegedAddChild
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(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.
|
String[] |
findAliases()
Return the set of alias names for this Host.
|
String[] |
findReloadedContextMemoryLeaks()
Attempt to identify the contexts that have a class loader memory leak.
|
String[] |
getAliases() |
String |
getAppBase()
Return the application root for this Host.
|
File |
getAppBaseFile()
(Return an absolute
File for the appBase of this Host. |
boolean |
getAutoDeploy()
Return the value of the auto deploy flag.
|
File |
getConfigBaseFile()
(Return a default configuration path of this Host.
|
String |
getConfigClass()
Return the Java class name of the context configuration class
for new web applications.
|
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.
|
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. |
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.
|
String |
getErrorReportValveClass()
Return the Java class name of the error report valve class
for new web applications.
|
String |
getName()
Return the canonical, fully qualified, name of the virtual host
this Container represents.
|
protected String |
getObjectNameKeyProperties()
Allow sub-classes to specify the key properties component of the
ObjectName that will be used to register this component. |
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.
|
String[] |
getValveNames()
Return the MBean Names of the Valves associated with this Host
|
String |
getWorkDir()
Host work directory base.
|
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(String alias)
Remove the specified alias name from the aliases for this Host.
|
void |
setAppBase(String appBase)
Set the application root for this Host.
|
void |
setAutoDeploy(boolean autoDeploy)
Set the auto deploy flag value for this host.
|
void |
setConfigClass(String configClass)
Set the Java class name of the context configuration class
for new web applications.
|
void |
setContextClass(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(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(String errorReportValveClass)
Set the Java class name of the error report valve class
for new web applications.
|
void |
setFailCtxIfServletStartFails(boolean failCtxIfServletStartFails) |
void |
setName(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(String workDir)
Host work directory base.
|
void |
setXmlBase(String xmlBase)
Set the Xml root for this Host.
|
protected void |
startInternal()
Start this component and implement the requirements
of
LifecycleBase.startInternal() . |
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, getMBeanKeyProperties, getParent, getParentClassLoader, getPipeline, getRealm, getRealmInternal, getStartChildren, getStartStopThreads, initInternal, logAccess, logName, 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, 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 ExecutorService getStartStopExecutor()
Host
getStartStopExecutor
in interface Host
public String getAppBase()
getAppBase
in interface Host
public 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(String appBase)
setAppBase
in interface Host
appBase
- The new application rootpublic String getXmlBase()
getXmlBase
in interface Host
public void setXmlBase(String xmlBase)
setXmlBase
in interface Host
xmlBase
- The new XML rootpublic 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 String getConfigClass()
getConfigClass
in interface Host
public void setConfigClass(String configClass)
setConfigClass
in interface Host
configClass
- The new context configuration classpublic String getContextClass()
public void setContextClass(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 String getErrorReportValveClass()
public void setErrorReportValveClass(String errorReportValveClass)
errorReportValveClass
- The new error report valve classpublic String getName()
getName
in interface Container
getName
in class ContainerBase
public void setName(String name)
setName
in interface Container
setName
in class ContainerBase
name
- Virtual host nameIllegalArgumentException
- if name is nullpublic boolean isUnpackWARs()
public void setUnpackWARs(boolean unpackWARs)
public String getWorkDir()
public void setWorkDir(String workDir)
public String getDeployIgnore()
getAppBase()
that will be ignored by the automatic
deployment process.getDeployIgnore
in interface Host
public Pattern getDeployIgnorePattern()
getAppBase()
that will be ignored by the
automatic deployment process.getDeployIgnorePattern
in interface Host
public void setDeployIgnore(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(String alias)
public void addChild(Container child)
addChild
in interface Container
addChild
in class ContainerBase
child
- Child container to be addedpublic String[] findReloadedContextMemoryLeaks()
public String[] findAliases()
findAliases
in interface Host
public void removeAlias(String alias)
removeAlias
in interface Host
alias
- Alias name to be removedpublic String toString()
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 String[] getValveNames() throws Exception
Exception
- if an MBean cannot be created or registeredpublic String[] getAliases()
protected String getObjectNameKeyProperties()
LifecycleMBeanBase
ObjectName
that will be used to register this component.getObjectNameKeyProperties
in class LifecycleMBeanBase
ObjectName
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.