org.apache.catalina.core
クラス StandardWrapper

java.lang.Object
  |
  +--org.apache.catalina.core.ContainerBase
        |
        +--org.apache.catalina.core.StandardWrapper
すべての実装インタフェース:
Container, Lifecycle, Pipeline, javax.servlet.ServletConfig, Wrapper

public final class StandardWrapper
extends ContainerBase
implements javax.servlet.ServletConfig, Wrapper

Standard implementation of the Wrapper interface that represents an individual servlet definition. No child Containers are allowed, and the parent Container must be a Context.

バージョン:
$Revision: 1.29.2.9 $ $Date: 2002/03/11 07:40:49 $
作成者:
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.Container から継承したフィールド
ADD_CHILD_EVENT, ADD_MAPPER_EVENT, ADD_VALVE_EVENT, REMOVE_CHILD_EVENT, REMOVE_MAPPER_EVENT, REMOVE_VALVE_EVENT
 
インタフェース org.apache.catalina.Lifecycle から継承したフィールド
START_EVENT, STOP_EVENT
 
コンストラクタの概要
StandardWrapper()
          Create a new StandardWrapper component with the default basic Valve.
 
メソッドの概要
 void addChild(Container child)
          Refuse to add a child Container, because Wrappers are the lowest level of the Container hierarchy.
protected  void addDefaultMapper(java.lang.String mapperClass)
          Add a default Mapper implementation if none have been configured explicitly.
 void addInitParameter(java.lang.String name, java.lang.String value)
          Add a new servlet initialization parameter for this servlet.
 void addInstanceListener(InstanceListener listener)
          Add a new listener interested in InstanceEvents.
 void addSecurityReference(java.lang.String name, java.lang.String link)
          Add a new security role reference record to the set of records for this servlet.
 javax.servlet.Servlet allocate()
          Allocate an initialized instance of this Servlet that is ready to have its service() method called.
 void deallocate(javax.servlet.Servlet servlet)
          Return this previously allocated servlet to the pool of available instances.
 java.lang.String findInitParameter(java.lang.String name)
          Return the value for the specified initialization parameter name, if any; otherwise return null.
 java.lang.String[] findInitParameters()
          Return the names of all defined initialization parameters for this servlet.
 java.lang.String findSecurityReference(java.lang.String name)
          Return the security role link for the specified security role reference name, if any; otherwise return null.
 java.lang.String[] findSecurityReferences()
          Return the set of security role reference names associated with this servlet, if any; otherwise return a zero-length array.
 long getAvailable()
          Return the available date/time for this servlet, in milliseconds since the epoch.
 int getCountAllocated()
          Return the number of active allocations of this servlet, even if they are all for the same instance (as will be true for servlets that do not implement SingleThreadModel.
 int getDebug()
          Return the debugging detail level for this component.
 java.lang.String getInfo()
          Return descriptive information about this Container implementation and the corresponding version number, in the format <description>/<version>.
 java.lang.String getInitParameter(java.lang.String name)
          Return the initialization parameter value for the specified name, if any; otherwise return null.
 java.util.Enumeration getInitParameterNames()
          Return the set of initialization parameter names defined for this servlet.
 InstanceSupport getInstanceSupport()
          Return the InstanceSupport object for this Wrapper instance.
 java.lang.String getJspFile()
          Return the context-relative URI of the JSP file for this servlet.
 int getLoadOnStartup()
          Return the load-on-startup order value (negative value means load on first call).
 int getMaxInstances()
          Return maximum number of instances that will be allocated when a single thread model servlet is used.
 java.lang.String getRunAs()
          Return the run-as identity for this servlet.
 java.lang.String getServletClass()
          Return the fully qualified servlet class name for this servlet.
 javax.servlet.ServletContext getServletContext()
          Return the servlet context with which this servlet is associated.
 java.lang.String getServletName()
          Return the name of this servlet.
 boolean isSingleThreadModel()
          Return true if the servlet class represented by this component implements the SingleThreadModel interface.
 boolean isUnavailable()
          Is this servlet currently unavailable?
 void load()
          Load and initialize an instance of this servlet, if there is not already at least one initialized instance.
 javax.servlet.Servlet loadServlet()
          Load and initialize an instance of this servlet, if there is not already at least one initialized instance.
protected  java.lang.String logName()
          Log the abbreviated name of this Container for logging messages.
 void removeInitParameter(java.lang.String name)
          Remove the specified initialization parameter from this servlet.
 void removeInstanceListener(InstanceListener listener)
          Remove a listener no longer interested in InstanceEvents.
 void removeSecurityReference(java.lang.String name)
          Remove any security role reference for the specified role name.
 void setAvailable(long available)
          Set the available date/time for this servlet, in milliseconds since the epoch.
 void setDebug(int debug)
          Set the debugging detail level for this component.
 void setJspFile(java.lang.String jspFile)
          Set the context-relative URI of the JSP file for this servlet.
 void setLoadOnStartup(int value)
          Set the load-on-startup order value (negative value means load on first call).
 void setLoadOnStartupString(java.lang.String value)
          Set the load-on-startup order value from a (possibly null) string.
 void setMaxInstances(int maxInstances)
          Set the maximum number of instances that will be allocated when a single thread model servlet is used.
 void setParent(Container container)
          Set the parent Container of this Wrapper, but only if it is a Context.
 void setRunAs(java.lang.String runAs)
          Set the run-as identity for this servlet.
 void setServletClass(java.lang.String servletClass)
          Set the fully qualified servlet class name for this servlet.
 void setServletName(java.lang.String name)
          Set the name of this servlet.
 void start()
          Start this component, pre-loading the servlet if the load-on-startup value is set appropriately.
 void stop()
          Stop this component, gracefully shutting down the servlet if it has been initialized.
 java.lang.String toString()
          Return a String representation of this component.
 void unavailable(javax.servlet.UnavailableException unavailable)
          Process an UnavailableException, marking this servlet as unavailable for the specified amount of time.
 void unload()
          Unload all initialized instances of this servlet, after calling the destroy() method for each instance.
 
クラス org.apache.catalina.core.ContainerBase から継承したメソッド
addContainerListener, addLifecycleListener, addMapper, addPropertyChangeListener, addValve, findChild, findChildren, findMapper, findMappers, fireContainerEvent, getBasic, getCluster, getLoader, getLogger, getManager, getName, getParent, getParentClassLoader, getPipeline, getRealm, getResources, getValves, invoke, log, log, map, removeChild, removeContainerListener, removeLifecycleListener, removeMapper, removePropertyChangeListener, removeValve, setBasic, setCluster, setLoader, setLogger, setManager, setName, setParentClassLoader, setRealm, setResources
 
クラス 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, getName, getParent, getParentClassLoader, getRealm, getResources, invoke, map, removeChild, removeContainerListener, removeMapper, removePropertyChangeListener, setCluster, setLoader, setLogger, setManager, setName, setParentClassLoader, setRealm, setResources
 

コンストラクタの詳細

StandardWrapper

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

getAvailable

public long getAvailable()
Return the available date/time for this servlet, in milliseconds since the epoch. If this date/time is in the future, any request for this servlet will return an SC_SERVICE_UNAVAILABLE error. If it is zero, the servlet is currently available. A value equal to Long.MAX_VALUE is considered to mean that unavailability is permanent.
定義:
インタフェース Wrapper 内の getAvailable

setAvailable

public void setAvailable(long available)
Set the available date/time for this servlet, in milliseconds since the epoch. If this date/time is in the future, any request for this servlet will return an SC_SERVICE_UNAVAILABLE error.
定義:
インタフェース Wrapper 内の setAvailable
パラメータ:
available - The new available date/time

getCountAllocated

public int getCountAllocated()
Return the number of active allocations of this servlet, even if they are all for the same instance (as will be true for servlets that do not implement SingleThreadModel.

getDebug

public int getDebug()
Return the debugging detail level for this component.
オーバーライド:
クラス ContainerBase 内の getDebug

setDebug

public void setDebug(int debug)
Set the debugging detail level for this component.
オーバーライド:
クラス ContainerBase 内の setDebug
パラメータ:
debug - The new debugging detail level

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

getInstanceSupport

public InstanceSupport getInstanceSupport()
Return the InstanceSupport object for this Wrapper instance.

getJspFile

public java.lang.String getJspFile()
Return the context-relative URI of the JSP file for this servlet.
定義:
インタフェース Wrapper 内の getJspFile

setJspFile

public void setJspFile(java.lang.String jspFile)
Set the context-relative URI of the JSP file for this servlet.
定義:
インタフェース Wrapper 内の setJspFile
パラメータ:
jspFile - JSP file URI

getLoadOnStartup

public int getLoadOnStartup()
Return the load-on-startup order value (negative value means load on first call).
定義:
インタフェース Wrapper 内の getLoadOnStartup

setLoadOnStartup

public void setLoadOnStartup(int value)
Set the load-on-startup order value (negative value means load on first call).
定義:
インタフェース Wrapper 内の setLoadOnStartup
パラメータ:
value - New load-on-startup value

setLoadOnStartupString

public void setLoadOnStartupString(java.lang.String value)
Set the load-on-startup order value from a (possibly null) string. Per the specification, any missing or non-numeric value is converted to a zero, so that this servlet will still be loaded at startup time, but in an arbitrary order.
パラメータ:
value - New load-on-startup value

getMaxInstances

public int getMaxInstances()
Return maximum number of instances that will be allocated when a single thread model servlet is used.

setMaxInstances

public void setMaxInstances(int maxInstances)
Set the maximum number of instances that will be allocated when a single thread model servlet is used.
パラメータ:
maxInstnces - New value of maxInstances

setParent

public void setParent(Container container)
Set the parent Container of this Wrapper, but only if it is a Context.
定義:
インタフェース Container 内の setParent
オーバーライド:
クラス ContainerBase 内の setParent
パラメータ:
container - Proposed parent Container

getRunAs

public java.lang.String getRunAs()
Return the run-as identity for this servlet.
定義:
インタフェース Wrapper 内の getRunAs

setRunAs

public void setRunAs(java.lang.String runAs)
Set the run-as identity for this servlet.
定義:
インタフェース Wrapper 内の setRunAs
パラメータ:
value - New run-as identity value

getServletClass

public java.lang.String getServletClass()
Return the fully qualified servlet class name for this servlet.
定義:
インタフェース Wrapper 内の getServletClass

setServletClass

public void setServletClass(java.lang.String servletClass)
Set the fully qualified servlet class name for this servlet.
定義:
インタフェース Wrapper 内の setServletClass
パラメータ:
servletClass - Servlet class name

setServletName

public void setServletName(java.lang.String name)
Set the name of this servlet. This is an alias for the normal Container.setName() method, and complements the getServletName() method required by the ServletConfig interface.
パラメータ:
name - The new name of this servlet

isSingleThreadModel

public boolean isSingleThreadModel()
Return true if the servlet class represented by this component implements the SingleThreadModel interface.

isUnavailable

public boolean isUnavailable()
Is this servlet currently unavailable?
定義:
インタフェース Wrapper 内の isUnavailable

addChild

public void addChild(Container child)
Refuse to add a child Container, because Wrappers are the lowest level of the Container hierarchy.
定義:
インタフェース Container 内の addChild
オーバーライド:
クラス ContainerBase 内の addChild
パラメータ:
child - Child container to be added

addInitParameter

public void addInitParameter(java.lang.String name,
                             java.lang.String value)
Add a new servlet initialization parameter for this servlet.
定義:
インタフェース Wrapper 内の addInitParameter
パラメータ:
name - Name of this initialization parameter to add
value - Value of this initialization parameter to add

addInstanceListener

public void addInstanceListener(InstanceListener listener)
Add a new listener interested in InstanceEvents.
定義:
インタフェース Wrapper 内の addInstanceListener
パラメータ:
listener - The new listener

addSecurityReference

public void addSecurityReference(java.lang.String name,
                                 java.lang.String link)
Add a new security role reference record to the set of records for this servlet.
定義:
インタフェース Wrapper 内の addSecurityReference
パラメータ:
name - Role name used within this servlet
link - Role name used within the web application

allocate

public javax.servlet.Servlet allocate()
                               throws javax.servlet.ServletException
Allocate an initialized instance of this Servlet that is ready to have its service() method called. If the servlet class does not implement SingleThreadModel, the (only) initialized instance may be returned immediately. If the servlet class implements SingleThreadModel, the Wrapper implementation must ensure that this instance is not allocated again until it is deallocated by a call to deallocate().
定義:
インタフェース Wrapper 内の allocate
例外:
javax.servlet.ServletException - if the servlet init() method threw an exception
javax.servlet.ServletException - if a loading error occurs

deallocate

public void deallocate(javax.servlet.Servlet servlet)
                throws javax.servlet.ServletException
Return this previously allocated servlet to the pool of available instances. If this servlet class does not implement SingleThreadModel, no action is actually required.
定義:
インタフェース Wrapper 内の deallocate
パラメータ:
servlet - The servlet to be returned
例外:
javax.servlet.ServletException - if a deallocation error occurs

findInitParameter

public java.lang.String findInitParameter(java.lang.String name)
Return the value for the specified initialization parameter name, if any; otherwise return null.
定義:
インタフェース Wrapper 内の findInitParameter
パラメータ:
name - Name of the requested initialization parameter

findInitParameters

public java.lang.String[] findInitParameters()
Return the names of all defined initialization parameters for this servlet.
定義:
インタフェース Wrapper 内の findInitParameters

findSecurityReference

public java.lang.String findSecurityReference(java.lang.String name)
Return the security role link for the specified security role reference name, if any; otherwise return null.
定義:
インタフェース Wrapper 内の findSecurityReference
パラメータ:
name - Security role reference used within this servlet

findSecurityReferences

public java.lang.String[] findSecurityReferences()
Return the set of security role reference names associated with this servlet, if any; otherwise return a zero-length array.
定義:
インタフェース Wrapper 内の findSecurityReferences

load

public void load()
          throws javax.servlet.ServletException
Load and initialize an instance of this servlet, if there is not already at least one initialized instance. This can be used, for example, to load servlets that are marked in the deployment descriptor to be loaded at server startup time.

IMPLEMENTATION NOTE: Servlets whose classnames begin with org.apache.catalina. (so-called "container" servlets) are loaded by the same classloader that loaded this class, rather than the classloader for the current web application. This gives such classes access to Catalina internals, which are prevented for classes loaded for web applications.

定義:
インタフェース Wrapper 内の load
例外:
javax.servlet.ServletException - if the servlet init() method threw an exception
javax.servlet.ServletException - if some other loading problem occurs

loadServlet

public javax.servlet.Servlet loadServlet()
                                  throws javax.servlet.ServletException
Load and initialize an instance of this servlet, if there is not already at least one initialized instance. This can be used, for example, to load servlets that are marked in the deployment descriptor to be loaded at server startup time.

removeInitParameter

public void removeInitParameter(java.lang.String name)
Remove the specified initialization parameter from this servlet.
定義:
インタフェース Wrapper 内の removeInitParameter
パラメータ:
name - Name of the initialization parameter to remove

removeInstanceListener

public void removeInstanceListener(InstanceListener listener)
Remove a listener no longer interested in InstanceEvents.
定義:
インタフェース Wrapper 内の removeInstanceListener
パラメータ:
listener - The listener to remove

removeSecurityReference

public void removeSecurityReference(java.lang.String name)
Remove any security role reference for the specified role name.
定義:
インタフェース Wrapper 内の removeSecurityReference
パラメータ:
name - Security role used within this servlet to be removed

toString

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

unavailable

public void unavailable(javax.servlet.UnavailableException unavailable)
Process an UnavailableException, marking this servlet as unavailable for the specified amount of time.
定義:
インタフェース Wrapper 内の unavailable
パラメータ:
unavailable - The exception that occurred, or null to mark this servlet as permanently unavailable

unload

public void unload()
            throws javax.servlet.ServletException
Unload all initialized instances of this servlet, after calling the destroy() method for each instance. This can be used, for example, prior to shutting down the entire servlet engine, or prior to reloading all of the classes from the Loader associated with our Loader's repository.
定義:
インタフェース Wrapper 内の unload
例外:
javax.servlet.ServletException - if an exception is thrown by the destroy() method

getInitParameter

public java.lang.String getInitParameter(java.lang.String name)
Return the initialization parameter value for the specified name, if any; otherwise return null.
定義:
インタフェース javax.servlet.ServletConfig 内の getInitParameter
パラメータ:
name - Name of the initialization parameter to retrieve

getInitParameterNames

public java.util.Enumeration getInitParameterNames()
Return the set of initialization parameter names defined for this servlet. If none are defined, an empty Enumeration is returned.
定義:
インタフェース javax.servlet.ServletConfig 内の getInitParameterNames

getServletContext

public javax.servlet.ServletContext getServletContext()
Return the servlet context with which this servlet is associated.
定義:
インタフェース javax.servlet.ServletConfig 内の getServletContext

getServletName

public java.lang.String getServletName()
Return the name of this servlet.
定義:
インタフェース javax.servlet.ServletConfig 内の getServletName

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

logName

protected java.lang.String logName()
Log the abbreviated name of this Container for logging messages.
オーバーライド:
クラス ContainerBase 内の logName

start

public void start()
           throws LifecycleException
Start this component, pre-loading the servlet if the load-on-startup value is set appropriately.
オーバーライド:
クラス ContainerBase 内の start
例外:
LifecycleException - if a fatal error occurs during startup

stop

public void stop()
          throws LifecycleException
Stop this component, gracefully shutting down the servlet if it has been initialized.
オーバーライド:
クラス ContainerBase 内の stop
例外:
LifecycleException - if a fatal error occurs during shutdown


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