Package org.apache.catalina
Interface Host
- 
- All Known Implementing Classes:
- StandardHost
 
 public interface Host extends Container A Host is a Container that represents a virtual host in the Catalina servlet engine. It is useful in the following types of scenarios:- You wish to use Interceptors that see every single request processed by this particular virtual host.
- You wish to run Catalina in with a standalone HTTP connector, but still want support for multiple virtual hosts.
 The parent Container attached to a Host is generally an Engine, but may be some other implementation, or may be omitted if it is not necessary. The child containers attached to a Host are generally implementations of Context (representing an individual servlet context). - Author:
- Craig R. McClanahan
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.apache.catalina.LifecycleLifecycle.SingleUse
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static java.lang.StringADD_ALIAS_EVENTThe ContainerEvent event type sent when a new alias is added byaddAlias().static java.lang.StringREMOVE_ALIAS_EVENTThe ContainerEvent event type sent when an old alias is removed byremoveAlias().- 
Fields inherited from interface org.apache.catalina.ContainerADD_CHILD_EVENT, ADD_VALVE_EVENT, REMOVE_CHILD_EVENT, REMOVE_VALVE_EVENT
 - 
Fields 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
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddAlias(java.lang.String alias)Add an alias name that should be mapped to this same Host.java.lang.String[]findAliases()java.lang.StringgetAppBase()java.io.FilegetAppBaseFile()booleangetAutoDeploy()java.io.FilegetConfigBaseFile()java.lang.StringgetConfigClass()booleangetCreateDirs()Returnstrueif the Host will attempt to create directories for appBase and xmlBase unless they already exist.java.lang.StringgetDeployIgnore()java.util.regex.PatterngetDeployIgnorePattern()booleangetDeployOnStartup()java.util.concurrent.ExecutorServicegetStartStopExecutor()booleangetUndeployOldVersions()java.lang.StringgetXmlBase()voidremoveAlias(java.lang.String alias)Remove the specified alias name from the aliases for this Host.voidsetAppBase(java.lang.String appBase)Set the application root for this Host.voidsetAutoDeploy(boolean autoDeploy)Set the auto deploy flag value for this host.voidsetConfigClass(java.lang.String configClass)Set the Java class name of the context configuration class for new web applications.voidsetCreateDirs(boolean createDirs)Should the Host attempt to create directories for xmlBase and appBase upon startup.voidsetDeployIgnore(java.lang.String deployIgnore)Set the regular expression that defines the files and directories in the host's appBase that will be ignored by the automatic deployment process.voidsetDeployOnStartup(boolean deployOnStartup)Set the deploy on startup flag value for this host.voidsetUndeployOldVersions(boolean undeployOldVersions)Set totrueif the Host should automatically undeploy old versions of applications deployed using parallel deployment.voidsetXmlBase(java.lang.String xmlBase)Set the Xml root for this Host.- 
Methods inherited from interface org.apache.catalina.ContaineraddChild, addContainerListener, addPropertyChangeListener, backgroundProcess, findChild, findChildren, findContainerListeners, fireContainerEvent, getAccessLog, getBackgroundProcessorDelay, getCatalinaBase, getCatalinaHome, getCluster, getDomain, getLogger, getLogName, getMBeanKeyProperties, getName, getObjectName, getParent, getParentClassLoader, getPipeline, getRealm, getStartStopThreads, logAccess, removeChild, removeContainerListener, removePropertyChangeListener, setBackgroundProcessorDelay, setCluster, setName, setParent, setParentClassLoader, setRealm, setStartStopThreads
 - 
Methods inherited from interface org.apache.catalina.LifecycleaddLifecycleListener, destroy, findLifecycleListeners, getState, getStateName, init, removeLifecycleListener, start, stop
 
- 
 
- 
- 
- 
Field Detail- 
ADD_ALIAS_EVENTstatic final java.lang.String ADD_ALIAS_EVENT The ContainerEvent event type sent when a new alias is added byaddAlias().- See Also:
- Constant Field Values
 
 - 
REMOVE_ALIAS_EVENTstatic final java.lang.String REMOVE_ALIAS_EVENT The ContainerEvent event type sent when an old alias is removed byremoveAlias().- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
getXmlBasejava.lang.String getXmlBase() - Returns:
- the XML root for this Host. This can be an absolute pathname, a relative pathname, or a URL. If null, the base path defaults to ${catalina.base}/conf/<engine name>/<host name> directory
 
 - 
setXmlBasevoid setXmlBase(java.lang.String xmlBase) Set the Xml root for this Host. This can be an absolute pathname, a relative pathname, or a URL. If null, the base path defaults to ${catalina.base}/conf/<engine name>/<host name> directory- Parameters:
- xmlBase- The new XML root
 
 - 
getConfigBaseFilejava.io.File getConfigBaseFile() - Returns:
- a default configuration path of this Host. The file will be canonical if possible.
 
 - 
getAppBasejava.lang.String getAppBase() - Returns:
- the application root for this Host. This can be an absolute pathname, a relative pathname, or a URL.
 
 - 
getAppBaseFilejava.io.File getAppBaseFile() - Returns:
- an absolute Filefor the appBase of this Host. The file will be canonical if possible. There is no guarantee that that the appBase exists.
 
 - 
setAppBasevoid setAppBase(java.lang.String appBase) Set the application root for this Host. This can be an absolute pathname, a relative pathname, or a URL.- Parameters:
- appBase- The new application root
 
 - 
getAutoDeployboolean getAutoDeploy() - Returns:
- the value of the auto deploy flag. If true, it indicates that this host's child webapps should be discovered and automatically deployed dynamically.
 
 - 
setAutoDeployvoid setAutoDeploy(boolean autoDeploy) Set the auto deploy flag value for this host.- Parameters:
- autoDeploy- The new auto deploy flag
 
 - 
getConfigClassjava.lang.String getConfigClass() - Returns:
- the Java class name of the context configuration class for new web applications.
 
 - 
setConfigClassvoid setConfigClass(java.lang.String configClass) Set the Java class name of the context configuration class for new web applications.- Parameters:
- configClass- The new context configuration class
 
 - 
getDeployOnStartupboolean getDeployOnStartup() - Returns:
- the value of the deploy on startup flag. If true, it indicates that this host's child webapps should be discovered and automatically deployed.
 
 - 
setDeployOnStartupvoid setDeployOnStartup(boolean deployOnStartup) Set the deploy on startup flag value for this host.- Parameters:
- deployOnStartup- The new deploy on startup flag
 
 - 
getDeployIgnorejava.lang.String getDeployIgnore() - Returns:
- the regular expression that defines the files and directories in the host's appBase that will be ignored by the automatic deployment process.
 
 - 
getDeployIgnorePatternjava.util.regex.Pattern getDeployIgnorePattern() - Returns:
- the compiled regular expression that defines the files and directories in the host's appBase that will be ignored by the automatic deployment process.
 
 - 
setDeployIgnorevoid setDeployIgnore(java.lang.String deployIgnore) Set the regular expression that defines the files and directories in the host's appBase that will be ignored by the automatic deployment process.- Parameters:
- deployIgnore- A regular expression matching file names
 
 - 
getStartStopExecutorjava.util.concurrent.ExecutorService getStartStopExecutor() - Returns:
- the executor that is used for starting and stopping contexts. This is primarily for use by components deploying contexts that want to do this in a multi-threaded manner.
 
 - 
getCreateDirsboolean getCreateDirs() Returnstrueif the Host will attempt to create directories for appBase and xmlBase unless they already exist.- Returns:
- true if the Host will attempt to create directories
 
 - 
setCreateDirsvoid setCreateDirs(boolean createDirs) Should the Host attempt to create directories for xmlBase and appBase upon startup.- Parameters:
- createDirs- The new value for this flag
 
 - 
getUndeployOldVersionsboolean getUndeployOldVersions() - Returns:
- trueof the Host is configured to automatically undeploy old versions of applications deployed using parallel deployment. This only takes effect is- getAutoDeploy()also returns- true.
 
 - 
setUndeployOldVersionsvoid setUndeployOldVersions(boolean undeployOldVersions) Set totrueif the Host should automatically undeploy old versions of applications deployed using parallel deployment. This only takes effect ifgetAutoDeploy()returnstrue.- Parameters:
- undeployOldVersions- The new value for this flag
 
 - 
addAliasvoid addAlias(java.lang.String alias) Add an alias name that should be mapped to this same Host.- Parameters:
- alias- The alias to be added
 
 - 
findAliasesjava.lang.String[] findAliases() - Returns:
- the set of alias names for this Host. If none are defined, a zero length array is returned.
 
 - 
removeAliasvoid removeAlias(java.lang.String alias) Remove the specified alias name from the aliases for this Host.- Parameters:
- alias- Alias name to be removed
 
 
- 
 
-