Package org.apache.catalina
Interface Host
-
- All Superinterfaces:
Container
- All Known Implementing Classes:
PEVirtualServer
,StandardHost
,VirtualServer
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).
- Version:
- $Revision: 1.2 $ $Date: 2005/12/08 01:27:16 $
- Author:
- Craig R. McClanahan
-
-
Field Summary
Fields Modifier and Type Field Description static String
ADD_ALIAS_EVENT
The ContainerEvent event type sent when a new alias is added byaddAlias()
.static String
REMOVE_ALIAS_EVENT
The ContainerEvent event type sent when an old alias is removed byremoveAlias()
.-
Fields inherited from interface org.apache.catalina.Container
ADD_CHILD_EVENT, ADD_MAPPER_EVENT, ADD_VALVE_EVENT, REMOVE_CHILD_EVENT, REMOVE_MAPPER_EVENT, REMOVE_VALVE_EVENT
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addAlias(String alias)
Add an alias name that should be mapped to this same Host.String[]
findAliases()
Return the set of alias names for this Host.String
getAppBase()
Return the application root for this Host.boolean
getAutoDeploy()
Return the value of the auto deploy flag.boolean
getDeployOnStartup()
Return the value of the deploy on startup flag.String
getName()
Return the canonical, fully qualified, name of the virtual host this Container represents.String[]
getNetworkListenerNames()
Gets the network listener names with which this Host is associated.boolean
getXmlNamespaceAware()
Get the server.xmlattribute's xmlNamespaceAware. boolean
getXmlValidation()
Get the server.xmlattribute's xmlValidation. Context
map(String uri)
Return the Context that would be used to process the specified host-relative request URI, if any; otherwise returnnull
.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
setDeployOnStartup(boolean deployOnStartup)
Set the deploy on startup flag value for this host.void
setName(String name)
Set the canonical, fully qualified, name of the virtual host this Container represents.void
setNetworkListenerNames(String[] networkListenerNames)
Associates this Host with the given network listener names.void
setXmlNamespaceAware(boolean xmlNamespaceAware)
Set the namespace aware feature of the XML parser used when parsing xml instances.void
setXmlValidation(boolean xmlValidation)
Set the validation feature of the XML parser used when parsing xml instances.-
Methods inherited from interface org.apache.catalina.Container
addChild, addContainerListener, addPropertyChangeListener, backgroundProcess, findChild, findChildren, findContainerListeners, fireContainerEvent, getBackgroundProcessorDelay, getInfo, getLoader, getLogger, getManager, getMappingObject, getParent, getParentClassLoader, getPipeline, getRealm, getResources, hasCustomPipeline, invoke, isCheckIfRequestIsSecure, removeChild, removeContainerListener, removePropertyChangeListener, setBackgroundProcessorDelay, setCheckIfRequestIsSecure, setLoader, setLogger, setManager, setParent, setParentClassLoader, setRealm, setResources
-
-
-
-
Field Detail
-
ADD_ALIAS_EVENT
static final String ADD_ALIAS_EVENT
The ContainerEvent event type sent when a new alias is added byaddAlias()
.- See Also:
- Constant Field Values
-
REMOVE_ALIAS_EVENT
static final String REMOVE_ALIAS_EVENT
The ContainerEvent event type sent when an old alias is removed byremoveAlias()
.- See Also:
- Constant Field Values
-
-
Method Detail
-
getAppBase
String getAppBase()
Return the application root for this Host. This can be an absolute pathname, a relative pathname, or a URL.
-
setAppBase
void setAppBase(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
-
getAutoDeploy
boolean getAutoDeploy()
Return the value of the auto deploy flag. If true, it indicates that this host's child webapps should be discovered and automatically deployed dynamically.
-
setAutoDeploy
void setAutoDeploy(boolean autoDeploy)
Set the auto deploy flag value for this host.- Parameters:
autoDeploy
- The new auto deploy flag
-
getDeployOnStartup
boolean getDeployOnStartup()
Return the value of the deploy on startup flag. If true, it indicates that this host's child webapps should be discovered and automatically deployed.
-
setDeployOnStartup
void setDeployOnStartup(boolean deployOnStartup)
Set the deploy on startup flag value for this host.- Parameters:
deployOnStartup
- The new deploy on startup flag
-
getName
String getName()
Return the canonical, fully qualified, name of the virtual host this Container represents.
-
setName
void setName(String name)
Set the canonical, fully qualified, name of the virtual host this Container represents.- Specified by:
setName
in interfaceContainer
- Parameters:
name
- Virtual host name- Throws:
IllegalArgumentException
- if name is null
-
getXmlNamespaceAware
boolean getXmlNamespaceAware()
Get the server.xmlattribute's xmlNamespaceAware. - Returns:
- true if namespace awareness is enabled.
-
getXmlValidation
boolean getXmlValidation()
Get the server.xmlattribute's xmlValidation. - Returns:
- true if validation is enabled.
-
setXmlValidation
void setXmlValidation(boolean xmlValidation)
Set the validation feature of the XML parser used when parsing xml instances.- Parameters:
xmlValidation
- true to enable xml instance validation
-
setXmlNamespaceAware
void setXmlNamespaceAware(boolean xmlNamespaceAware)
Set the namespace aware feature of the XML parser used when parsing xml instances.- Parameters:
xmlNamespaceAware
- true to enable namespace awareness
-
setNetworkListenerNames
void setNetworkListenerNames(String[] networkListenerNames)
Associates this Host with the given network listener names.- Parameters:
networkListenerNames
- The network listener names with which to associate this Host
-
getNetworkListenerNames
String[] getNetworkListenerNames()
Gets the network listener names with which this Host is associated.- Returns:
- The network listener names with which this Host is associated, or null if this Host has not been associated with any network listener
-
addAlias
void addAlias(String alias)
Add an alias name that should be mapped to this same Host.- Parameters:
alias
- The alias to be added
-
findAliases
String[] findAliases()
Return the set of alias names for this Host. If none are defined, a zero length array is returned.
-
map
Context map(String uri)
Return the Context that would be used to process the specified host-relative request URI, if any; otherwise returnnull
.- Parameters:
uri
- Request URI to be mapped
-
removeAlias
void removeAlias(String alias)
Remove the specified alias name from the aliases for this Host.- Parameters:
alias
- Alias name to be removed
-
-