|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.catalina.core.ContainerBase
org.apache.catalina.core.StandardHost
Standard implementation of the Host interface. Each child container must be a Context implementation to process the requests directed to a particular web application.
| Nested Class Summary |
| Nested classes inherited from class org.apache.catalina.core.ContainerBase |
ContainerBase.PrivilegedAddChild |
| Field Summary |
| Fields inherited from class org.apache.catalina.core.ContainerBase |
children, cluster, debug, lifecycle, listeners, loader, logger, manager, mapper, mappers, name, parent, parentClassLoader, pipeline, realm, resources, sm, started, support |
| Fields inherited from interface org.apache.catalina.Deployer |
INSTALL_EVENT, PRE_INSTALL_EVENT, REMOVE_EVENT |
| Fields inherited from interface org.apache.catalina.Host |
ADD_ALIAS_EVENT, REMOVE_ALIAS_EVENT |
| 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 |
| Fields inherited from interface org.apache.catalina.Lifecycle |
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, START_EVENT, STOP_EVENT |
| Constructor Summary | |
StandardHost()
Create a new StandardHost component with the default basic Valve. |
|
| Method Summary | |
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. |
void |
addDefaultContext(DefaultContext defaultContext)
Set the DefaultContext for new web applications. |
protected void |
addDefaultMapper(java.lang.String mapperClass)
Add a default Mapper implementation if none have been configured explicitly. |
java.lang.String[] |
findAliases()
Return the set of alias names for this Host. |
Context |
findDeployedApp(java.lang.String contextPath)
Return the Context for the deployed application that is associated with the specified context path (if any); otherwise return null. |
java.lang.String[] |
findDeployedApps()
Return the context paths of all deployed web applications in this Container. |
java.lang.String |
getAppBase()
Return the application root for this Host. |
boolean |
getAutoDeploy()
Return the value of the auto deploy flag. |
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. |
DefaultContext |
getDefaultContext()
Retrieve the DefaultContext for new web applications. |
java.lang.String |
getErrorReportValveClass()
Return the Java class name of the error report valve class for new web applications. |
java.lang.String |
getInfo()
Return descriptive information about this Container implementation and the corresponding version number, in the format <description>/<version>. |
boolean |
getLiveDeploy()
Return the value of the live deploy flag. |
java.lang.String |
getMapperClass()
Return the default Mapper class name. |
java.lang.String |
getName()
Return the canonical, fully qualified, name of the virtual host this Container represents. |
java.lang.String |
getWorkDir()
Host work directory base. |
void |
importDefaultContext(Context context)
Import the DefaultContext config into a web application context. |
void |
install(java.lang.String contextPath,
java.net.URL war)
Install a new web application, whose web application archive is at the specified URL, into this container with the specified context path. |
void |
install(java.net.URL config,
java.net.URL war)
Install a new web application, whose context configuration file (consisting of a <Context> element) and web
application archive are at the specified URLs. |
boolean |
isDeployXML()
Deploy XML Context config files flag accessor. |
boolean |
isUnpackWARs()
Unpack WARs flag accessor. |
Context |
map(java.lang.String uri)
Return the Context that would be used to process the specified host-relative request URI, if any; otherwise return null. |
void |
remove(java.lang.String contextPath)
Remove an existing web application, attached to the specified context path. |
void |
remove(java.lang.String contextPath,
boolean undeploy)
Remove an existing web application, attached to the specified context path. |
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 |
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 |
setLiveDeploy(boolean liveDeploy)
Set the live deploy flag value for this host. |
void |
setMapperClass(java.lang.String mapperClass)
Set the default Mapper class name. |
void |
setName(java.lang.String name)
Set the canonical, fully qualified, name of the virtual host this Container represents. |
void |
setUnpackWARs(boolean unpackWARs)
Unpack WARs flag mutator. |
void |
setWorkDir(java.lang.String workDir)
Host work directory base. |
void |
start()
Start this host. |
void |
start(java.lang.String contextPath)
Start an existing web application, attached to the specified context path. |
void |
stop(java.lang.String contextPath)
Stop an existing web application, attached to the specified context path. |
java.lang.String |
toString()
Return a String representation of this component. |
| Methods inherited from class org.apache.catalina.core.ContainerBase |
addContainerListener, addLifecycleListener, addMapper, addPropertyChangeListener, addValve, findChild, findChildren, findContainerListeners, findLifecycleListeners, findMapper, findMappers, fireContainerEvent, getBasic, getCluster, getDebug, getLoader, getLogger, getManager, getParent, getParentClassLoader, getPipeline, getRealm, getResources, getValves, invoke, log, log, logName, map, removeChild, removeContainerListener, removeLifecycleListener, removeMapper, removePropertyChangeListener, removeValve, setBasic, setCluster, setDebug, setLoader, setLogger, setManager, setParent, setParentClassLoader, setRealm, setResources, stop |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.catalina.Container |
addContainerListener, addMapper, addPropertyChangeListener, findChild, findChildren, findContainerListeners, findMapper, findMappers, getCluster, getLoader, getLogger, getManager, getParent, getParentClassLoader, getRealm, getResources, invoke, map, removeChild, removeContainerListener, removeMapper, removePropertyChangeListener, setCluster, setLoader, setLogger, setManager, setParent, setParentClassLoader, setRealm, setResources |
| Constructor Detail |
public StandardHost()
| Method Detail |
public java.lang.String getAppBase()
getAppBase in interface Hostpublic void setAppBase(java.lang.String appBase)
setAppBase in interface HostappBase - The new application rootpublic boolean getAutoDeploy()
getAutoDeploy in interface Hostpublic void setAutoDeploy(boolean autoDeploy)
setAutoDeploy in interface HostautoDeploy - The new auto deploy flagpublic java.lang.String getConfigClass()
public void setConfigClass(java.lang.String configClass)
configClass - The new context configuration classpublic void addDefaultContext(DefaultContext defaultContext)
addDefaultContext in interface HostdefaultContext - The new DefaultContextpublic DefaultContext getDefaultContext()
getDefaultContext in interface Hostpublic java.lang.String getContextClass()
public void setContextClass(java.lang.String contextClass)
contextClass - The new context implementation classpublic boolean isDeployXML()
public void setDeployXML(boolean deployXML)
public boolean getLiveDeploy()
appBase directory, and deploys new ones as they are
encountered.
public void setLiveDeploy(boolean liveDeploy)
liveDeploy - The new live deploy flagpublic java.lang.String getMapperClass()
public void setMapperClass(java.lang.String mapperClass)
mapperClass - The new default Mapper class namepublic 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 DeployergetName in class ContainerBasepublic void setName(java.lang.String name)
setName in interface HostsetName in class ContainerBasename - Virtual host name
java.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 void importDefaultContext(Context context)
importDefaultContext in interface Hostcontext - web application context to import default contextpublic void addAlias(java.lang.String alias)
addAlias in interface Hostalias - The alias to be addedpublic void addChild(Container child)
addChild in interface ContaineraddChild in class ContainerBasechild - Child container to be addedpublic java.lang.String[] findAliases()
findAliases in interface Hostpublic java.lang.String getInfo()
<description>/<version>.
getInfo in interface ContainergetInfo in class ContainerBasepublic Context map(java.lang.String uri)
null.
map in interface Hosturi - Request URI to be mappedpublic void removeAlias(java.lang.String alias)
removeAlias in interface Hostalias - Alias name to be removedpublic java.lang.String toString()
public void start()
throws LifecycleException
start in interface Lifecyclestart in class ContainerBaseLifecycleException - if this component detects a fatal error
that prevents it from being started
public void install(java.lang.String contextPath,
java.net.URL war)
throws java.io.IOException
If this application is successfully installed, a ContainerEvent of type
INSTALL_EVENT will be sent to all registered listeners,
with the newly created Context as an argument.
install in interface DeployercontextPath - The context path to which this application should
be installed (must be unique)war - A URL of type "jar:" that points to a WAR file, or type
"file:" that points to an unpacked directory structure containing
the web application to be installed
java.lang.IllegalArgumentException - if the specified context path
is malformed (it must be "" or start with a slash)
java.lang.IllegalStateException - if the specified context path
is already attached to an existing web application
java.io.IOException - if an input/output error was encountered
during install
public void install(java.net.URL config,
java.net.URL war)
throws java.io.IOException
Install a new web application, whose context configuration file
(consisting of a <Context> element) and web
application archive are at the specified URLs.
If this application is successfully installed, a ContainerEvent
of type INSTALL_EVENT will be sent to all registered
listeners, with the newly created Context as an argument.
install in interface Deployerconfig - A URL that points to the context configuration file to
be used for configuring the new Contextwar - A URL of type "jar:" that points to a WAR file, or type
"file:" that points to an unpacked directory structure containing
the web application to be installed
java.lang.IllegalArgumentException - if one of the specified URLs is
null
java.lang.IllegalStateException - if the context path specified in the
context configuration file is already attached to an existing web
application
java.io.IOException - if an input/output error was encountered
during installationpublic Context findDeployedApp(java.lang.String contextPath)
null.
findDeployedApp in interface DeployercontextPath - The context path of the requested web applicationpublic java.lang.String[] findDeployedApps()
findDeployedApps in interface Deployer
public void remove(java.lang.String contextPath)
throws java.io.IOException
REMOVE_EVENT will be sent to all
registered listeners, with the removed Context as
an argument.
remove in interface DeployercontextPath - The context path of the application to be removed
java.lang.IllegalArgumentException - if the specified context path
is malformed (it must be "" or start with a slash)
java.lang.IllegalArgumentException - if the specified context path does
not identify a currently installed web application
java.io.IOException - if an input/output error occurs during
removal
public void remove(java.lang.String contextPath,
boolean undeploy)
throws java.io.IOException
REMOVE_EVENT will be sent to all
registered listeners, with the removed Context as
an argument. Deletes the web application war file and/or directory
if they exist in the Host's appBase.
remove in interface DeployercontextPath - The context path of the application to be removedundeploy - boolean flag to remove web application from server
java.lang.IllegalArgumentException - if the specified context path
is malformed (it must be "" or start with a slash)
java.lang.IllegalArgumentException - if the specified context path does
not identify a currently installed web application
java.io.IOException - if an input/output error occurs during
removal
public void start(java.lang.String contextPath)
throws java.io.IOException
start in interface DeployercontextPath - The context path of the application to be started
java.lang.IllegalArgumentException - if the specified context path
is malformed (it must be "" or start with a slash)
java.lang.IllegalArgumentException - if the specified context path does
not identify a currently installed web application
java.io.IOException - if an input/output error occurs during
startup
public void stop(java.lang.String contextPath)
throws java.io.IOException
stop in interface DeployercontextPath - The context path of the application to be stopped
java.lang.IllegalArgumentException - if the specified context path
is malformed (it must be "" or start with a slash)
java.lang.IllegalArgumentException - if the specified context path does
not identify a currently installed web application
java.io.IOException - if an input/output error occurs while stopping
the web applicationprotected void addDefaultMapper(java.lang.String mapperClass)
addDefaultMapper in class ContainerBasemapperClass - Java class name of the default Mapper
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||