Save This Page
Home » apache-tomcat-6.0.26-src » org.apache » catalina » startup » [javadoc | source]
org.apache.catalina.startup
public class: HostConfig [javadoc | source]
java.lang.Object
   org.apache.catalina.startup.HostConfig

All Implemented Interfaces:
    LifecycleListener

Startup event listener for a Host that configures the properties of that Host, and the associated defined contexts.
Nested Class Summary:
protected class  HostConfig.DeployedApplication  This class represents the state of a deployed application, as well as the monitored resources. 
Field Summary
protected static  Log log     
protected  File appBase    App base. 
protected  File configBase    Config base. 
protected  String configClass    The Java class name of the Context configuration class we should use. 
protected  String contextClass    The Java class name of the Context implementation we should use. 
protected  Host host    The Host we are associated with. 
protected  ObjectName oname    The JMX ObjectName of this component. 
protected static final  StringManager sm    The string resources for this package. 
protected  boolean deployXML    Should we deploy XML Context config files? 
protected  boolean unpackWARs    Should we unpack WAR files when auto-deploying applications in the appBase directory? 
protected  HashMap deployed    Map of deployed applications. 
protected  ArrayList serviced    List of applications which are being serviced, and shouldn't be deployed/undeployed/redeployed at the moment. 
protected  boolean xmlValidation    Attribute value used to turn on/off XML validation 
protected  boolean xmlNamespaceAware    Attribute value used to turn on/off XML namespace awarenes. 
protected static  Digester digester    The Digester instance used to parse context descriptors. 
protected  Set<String> invalidWars    The list of Wars in the appBase to be ignored because they are invalid (e.g. contain /../ sequences). 
Method from org.apache.catalina.startup.HostConfig Summary:
addServiced,   addWatchedResources,   appBase,   check,   check,   checkResources,   configBase,   createDigester,   deployApps,   deployApps,   deployDescriptor,   deployDescriptors,   deployDirectories,   deployDirectory,   deployWAR,   deployWARs,   deploymentExists,   getConfigBaseName,   getConfigClass,   getConfigFile,   getContextClass,   getDeploymentTime,   getDocBase,   getXmlNamespaceAware,   getXmlValidation,   isDeployXML,   isDeployed,   isServiced,   isUnpackWARs,   lifecycleEvent,   manageApp,   removeServiced,   setConfigClass,   setContextClass,   setDeployXML,   setUnpackWARs,   setXmlNamespaceAware,   setXmlValidation,   start,   stop,   undeployApps,   unmanageApp
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.catalina.startup.HostConfig Detail:
 public synchronized  void addServiced(String name) 
    Add a serviced application to the list.
 protected  void addWatchedResources(DeployedApplication app,
    String docBase,
    Context context) 
    Add watched resources to the specified Context.
 protected File appBase() 
    Return a File object representing the "application root" directory for our associated Host.
 protected  void check() 
    Check status of all webapps.
 public  void check(String name) 
    Check status of a specific webapp, for use with stuff like management webapps.
 protected synchronized  void checkResources(DeployedApplication app) 
    Check resources for redeployment and reloading.
 protected File configBase() 
    Return a File object representing the "configuration root" directory for our associated Host.
 protected static Digester createDigester() 
    Create the digester which will be used to parse context config files.
 protected  void deployApps() 
    Deploy applications for any directories or WAR files that are found in our "application root" directory.
 protected  void deployApps(String name) 
    Deploy applications for any directories or WAR files that are found in our "application root" directory.
 protected  void deployDescriptor(String contextPath,
    File contextXml,
    String file) 
 protected  void deployDescriptors(File configBase,
    String[] files) 
    Deploy XML context descriptors.
 protected  void deployDirectories(File appBase,
    String[] files) 
    Deploy directories.
 protected  void deployDirectory(String contextPath,
    File dir,
    String file) 
 protected  void deployWAR(String contextPath,
    File war,
    String file) 
 protected  void deployWARs(File appBase,
    String[] files) 
    Deploy WAR files.
 protected boolean deploymentExists(String contextPath) 
    Check if a webapp is already deployed in this host.
 public String getConfigBaseName() 
    Get the name of the configBase. For use with JMX management.
 public String getConfigClass() 
    Return the Context configuration class name.
 protected String getConfigFile(String path) 
    Given a context path, get the config file name.
 public String getContextClass() 
    Return the Context implementation class name.
 public long getDeploymentTime(String name) 
    Get the instant where an application was deployed.
 protected String getDocBase(String path) 
    Given a context path, get the docBase.
 public boolean getXmlNamespaceAware() 
    Get the server.xml <host> attribute's xmlNamespaceAware.
 public boolean getXmlValidation() 
    Get the server.xml <host> attribute's xmlValidation.
 public boolean isDeployXML() 
    Return the deploy XML config file flag for this component.
 public boolean isDeployed(String name) 
    Has the specified application been deployed? Note applications defined in server.xml will not have been deployed.
 public synchronized boolean isServiced(String name) 
    Is application serviced ?
 public boolean isUnpackWARs() 
    Return the unpack WARs flag.
 public  void lifecycleEvent(LifecycleEvent event) 
    Process the START event for an associated Host.
 public  void manageApp(Context context) 
    Add a new Context to be managed by us. Entry point for the admin webapp, and other JMX Context controlers.
 public synchronized  void removeServiced(String name) 
    Removed a serviced application from the list.
 public  void setConfigClass(String configClass) 
    Set the Context configuration class name.
 public  void setContextClass(String contextClass) 
    Set the Context implementation class name.
 public  void setDeployXML(boolean deployXML) 
    Set the deploy XML config file flag for this component.
 public  void setUnpackWARs(boolean unpackWARs) 
    Set the unpack WARs flag.
 public  void setXmlNamespaceAware(boolean xmlNamespaceAware) 
    Set the namespace aware feature of the XML parser used when parsing xml instances.
 public  void setXmlValidation(boolean xmlValidation) 
    Set the validation feature of the XML parser used when parsing xml instances.
 public  void start() 
    Process a "start" event for this Host.
 public  void stop() 
    Process a "stop" event for this Host.
 protected  void undeployApps() 
    Undeploy all deployed applications.
 public  void unmanageApp(String contextPath) 
    Remove a webapp from our control. Entry point for the admin webapp, and other JMX Context controlers.