org.apache.catalina.core
クラス StandardHost

java.lang.Object
  |
  +--org.apache.catalina.core.ContainerBase
        |
        +--org.apache.catalina.core.StandardHost
すべての実装インタフェース:
Container, Deployer, Host, Lifecycle, Pipeline
直系の既知のサブクラス:
WarpHost

public class StandardHost
extends ContainerBase
implements Deployer, Host

Standard implementation of the Host interface. Each child container must be a Context implementation to process the requests directed to a particular web application.

バージョン:
$Revision: 1.18.2.4 $ $Date: 2002/03/02 18:00:12 $
作成者:
Craig R. McClanahan, Remy Maucherat

クラス org.apache.catalina.core.ContainerBase から継承したフィールド
children, cluster, debug, lifecycle, listeners, loader, logger, manager, mapper, mapperClass, mappers, name, parent, parentClassLoader, pipeline, realm, resources, sm, started, support
 
インタフェース org.apache.catalina.Deployer から継承したフィールド
INSTALL_EVENT, REMOVE_EVENT
 
インタフェース org.apache.catalina.Container から継承したフィールド
ADD_CHILD_EVENT, ADD_MAPPER_EVENT, ADD_VALVE_EVENT, REMOVE_CHILD_EVENT, REMOVE_MAPPER_EVENT, REMOVE_VALVE_EVENT
 
インタフェース org.apache.catalina.Host から継承したフィールド
ADD_ALIAS_EVENT, REMOVE_ALIAS_EVENT
 
インタフェース org.apache.catalina.Lifecycle から継承したフィールド
START_EVENT, STOP_EVENT
 
コンストラクタの概要
StandardHost()
          Create a new StandardHost component with the default basic Valve.
 
メソッドの概要
 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.
protected  void expand(java.io.InputStream input, java.io.File docBase, java.lang.String name)
          Expand the specified input stream into the specified directory, creating a file named from the specified relative path.
protected  java.lang.String expand(java.net.URL war)
          Expand the WAR file found at the specified URL into an unpacked directory structure, and return the absolute pathname to the expanded directory.
 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.
 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.
 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>.
 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.
 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.
protected  void remove(java.io.File dir)
          Remove the specified directory and all of its contents.
 void remove(java.lang.String contextPath)
          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 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 setErrorReportValveClass(java.lang.String errorReportValveClass)
          Set the Java class name of the error report valve class for new web applications.
 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.
 
クラス org.apache.catalina.core.ContainerBase から継承したメソッド
addContainerListener, addLifecycleListener, addMapper, addPropertyChangeListener, addValve, findChild, findChildren, 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
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
インタフェース org.apache.catalina.Container から継承したメソッド
addContainerListener, addMapper, addPropertyChangeListener, findChild, findChildren, findMapper, findMappers, getCluster, getLoader, getLogger, getManager, getParent, getParentClassLoader, getRealm, getResources, invoke, map, removeChild, removeContainerListener, removeMapper, removePropertyChangeListener, setCluster, setLoader, setLogger, setManager, setParent, setParentClassLoader, setRealm, setResources
 

コンストラクタの詳細

StandardHost

public StandardHost()
Create a new StandardHost component with the default basic Valve.
メソッドの詳細

getAppBase

public java.lang.String getAppBase()
Return the application root for this Host. This can be an absolute pathname, a relative pathname, or a URL.
定義:
インタフェース Host 内の getAppBase

setAppBase

public void setAppBase(java.lang.String appBase)
Set the application root for this Host. This can be an absolute pathname, a relative pathname, or a URL.
定義:
インタフェース Host 内の setAppBase
パラメータ:
appBase - The new application root

getConfigClass

public java.lang.String getConfigClass()
Return the Java class name of the context configuration class for new web applications.

setConfigClass

public void setConfigClass(java.lang.String configClass)
Set the Java class name of the context configuration class for new web applications.
パラメータ:
configClass - The new context configuration class

addDefaultContext

public void addDefaultContext(DefaultContext defaultContext)
Set the DefaultContext for new web applications.
定義:
インタフェース Host 内の addDefaultContext
パラメータ:
defaultContext - The new DefaultContext

getContextClass

public java.lang.String getContextClass()
Return the Java class name of the Context implementation class for new web applications.

setContextClass

public void setContextClass(java.lang.String contextClass)
Set the Java class name of the Context implementation class for new web applications.
パラメータ:
contextClass - The new context implementation class

getMapperClass

public java.lang.String getMapperClass()
Return the default Mapper class name.

setMapperClass

public void setMapperClass(java.lang.String mapperClass)
Set the default Mapper class name.
パラメータ:
mapperClass - The new default Mapper class name

getErrorReportValveClass

public java.lang.String getErrorReportValveClass()
Return the Java class name of the error report valve class for new web applications.

setErrorReportValveClass

public void setErrorReportValveClass(java.lang.String errorReportValveClass)
Set the Java class name of the error report valve class for new web applications.
パラメータ:
errorReportValveClass - The new error report valve class

getName

public java.lang.String getName()
Return the canonical, fully qualified, name of the virtual host this Container represents.
定義:
インタフェース Container 内の getName
オーバーライド:
クラス ContainerBase 内の getName

setName

public void setName(java.lang.String name)
Set the canonical, fully qualified, name of the virtual host this Container represents.
定義:
インタフェース Container 内の setName
オーバーライド:
クラス ContainerBase 内の setName
パラメータ:
name - Virtual host name
例外:
java.lang.IllegalArgumentException - if name is null

isUnpackWARs

public boolean isUnpackWARs()
Unpack WARs flag accessor.

setUnpackWARs

public void setUnpackWARs(boolean unpackWARs)
Unpack WARs flag mutator.

getWorkDir

public java.lang.String getWorkDir()
Host work directory base.

setWorkDir

public void setWorkDir(java.lang.String workDir)
Host work directory base.

importDefaultContext

public void importDefaultContext(Context context)
Import the DefaultContext config into a web application context.
定義:
インタフェース Host 内の importDefaultContext
パラメータ:
context - web application context to import default context

addAlias

public void addAlias(java.lang.String alias)
Add an alias name that should be mapped to this same Host.
定義:
インタフェース Host 内の addAlias
パラメータ:
alias - The alias to be added

addChild

public void addChild(Container child)
Add a child Container, only if the proposed child is an implementation of Context.
定義:
インタフェース Container 内の addChild
オーバーライド:
クラス ContainerBase 内の addChild
パラメータ:
child - Child container to be added

findAliases

public java.lang.String[] findAliases()
Return the set of alias names for this Host. If none are defined, a zero length array is returned.
定義:
インタフェース Host 内の findAliases

getInfo

public java.lang.String getInfo()
Return descriptive information about this Container implementation and the corresponding version number, in the format <description>/<version>.
定義:
インタフェース Container 内の getInfo
オーバーライド:
クラス ContainerBase 内の getInfo

map

public 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.
定義:
インタフェース Host 内の map
パラメータ:
uri - Request URI to be mapped

removeAlias

public void removeAlias(java.lang.String alias)
Remove the specified alias name from the aliases for this Host.
定義:
インタフェース Host 内の removeAlias
パラメータ:
alias - Alias name to be removed

toString

public java.lang.String toString()
Return a String representation of this component.
オーバーライド:
クラス java.lang.Object 内の toString

start

public void start()
           throws LifecycleException
Start this host.
オーバーライド:
クラス ContainerBase 内の start
例外:
java.lang.IllegalStateException - if this component has already been started
LifecycleException - if this component detects a fatal error that prevents it from being started

install

public void install(java.lang.String contextPath,
                    java.net.URL war)
             throws java.io.IOException
Install a new web application, whose web application archive is at the specified URL, into this container with the specified context path. A context path of "" (the empty string) should be used for the root application for this container. Otherwise, the context path must start with a slash.

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.

定義:
インタフェース Deployer 内の install
パラメータ:
contextPath - 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.IllegalArgumentException - 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

findDeployedApp

public 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.
定義:
インタフェース Deployer 内の findDeployedApp
パラメータ:
contextPath - The context path of the requested web application

findDeployedApps

public java.lang.String[] findDeployedApps()
Return the context paths of all deployed web applications in this Container. If there are no deployed applications, a zero-length array is returned.
定義:
インタフェース Deployer 内の findDeployedApps

remove

public void remove(java.lang.String contextPath)
            throws java.io.IOException
Remove an existing web application, attached to the specified context path. If this application is successfully removed, a ContainerEvent of type REMOVE_EVENT will be sent to all registered listeners, with the removed Context as an argument.
定義:
インタフェース Deployer 内の remove
パラメータ:
contextPath - 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

start

public void start(java.lang.String contextPath)
           throws java.io.IOException
Start an existing web application, attached to the specified context path. Only starts a web application if it is not running.
定義:
インタフェース Deployer 内の start
パラメータ:
contextPath - 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

stop

public void stop(java.lang.String contextPath)
          throws java.io.IOException
Stop an existing web application, attached to the specified context path. Only stops a web application if it is running.
定義:
インタフェース Deployer 内の stop
パラメータ:
contextPath - 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 application

addDefaultMapper

protected void addDefaultMapper(java.lang.String mapperClass)
Add a default Mapper implementation if none have been configured explicitly.
オーバーライド:
クラス ContainerBase 内の addDefaultMapper
パラメータ:
mapperClass - Java class name of the default Mapper

expand

protected java.lang.String expand(java.net.URL war)
                           throws java.io.IOException
Expand the WAR file found at the specified URL into an unpacked directory structure, and return the absolute pathname to the expanded directory.
パラメータ:
war - URL of the web application archive to be expanded (must start with "jar:")
例外:
java.lang.IllegalArgumentException - if this is not a "jar:" URL
java.io.IOException - if an input/output error was encountered during expansion

expand

protected void expand(java.io.InputStream input,
                      java.io.File docBase,
                      java.lang.String name)
               throws java.io.IOException
Expand the specified input stream into the specified directory, creating a file named from the specified relative path.
パラメータ:
input - InputStream to be copied
docBase - Document base directory into which we are expanding
name - Relative pathname of the file to be created
例外:
java.io.IOException - if an input/output error occurs

remove

protected void remove(java.io.File dir)
               throws java.io.IOException
Remove the specified directory and all of its contents.
パラメータ:
dir - Directory to be removed
例外:
java.io.IOException - if an input/output error occurs


Copyright ? 2000-2001 Apache Software Foundation. All Rights Reserved.