org.apache.catalina.core
Class StandardWrapperFacade

java.lang.Object
  extended by org.apache.catalina.core.StandardWrapperFacade
All Implemented Interfaces:
javax.servlet.Registration, javax.servlet.ServletConfig, javax.servlet.ServletRegistration
Direct Known Subclasses:
StandardWrapperFacade.Dynamic

public class StandardWrapperFacade
extends java.lang.Object
implements javax.servlet.ServletRegistration, javax.servlet.ServletConfig

Facade for the StandardWrapper object.

Version:
$Revision: 1250 $ $Date: 2009-11-06 18:08:04 +0100 (Fri, 06 Nov 2009) $
Author:
Remy Maucharat

Nested Class Summary
static class StandardWrapperFacade.Dynamic
           
 
Constructor Summary
StandardWrapperFacade(StandardWrapper wrapper)
          Create a new facede around a StandardWrapper.
 
Method Summary
 java.util.Set<java.lang.String> addMapping(java.lang.String... urlPatterns)
          Adds a servlet mapping with the given URL patterns for the Servlet represented by this ServletRegistration.
 java.lang.String getClassName()
          Gets the fully qualified class name of the Servlet or Filter that is represented by this Registration.
 java.lang.String getInitParameter(java.lang.String name)
          Gets the value of the initialization parameter with the given name that will be used to initialize the Servlet or Filter represented by this Registration object.
 java.util.Enumeration getInitParameterNames()
          Returns the names of the servlet's initialization parameters as an Enumeration of String objects, or an empty Enumeration if the servlet has no initialization parameters.
 java.util.Map<java.lang.String,java.lang.String> getInitParameters()
          Gets an immutable (and possibly empty) Map containing the currently available initialization parameters that will be used to initialize the Servlet or Filter represented by this Registration object.
 java.util.Collection<java.lang.String> getMappings()
          Gets the currently available mappings of the Servlet represented by this ServletRegistration.
 java.lang.String getName()
          Gets the name of the Servlet or Filter that is represented by this Registration.
 java.lang.String getRunAsRole()
          Gets the name of the runAs role of the Servlet represented by this ServletRegistration.
 javax.servlet.ServletContext getServletContext()
          Returns a reference to the ServletContext in which the caller is executing.
 java.lang.String getServletName()
          Returns the name of this servlet instance.
 void setAsyncSupported(boolean asyncSupported)
           
 void setDescription(java.lang.String description)
           
 boolean setInitParameter(java.lang.String name, java.lang.String value)
          Sets the initialization parameter with the given name and value on the Servlet or Filter that is represented by this Registration.
 java.util.Set<java.lang.String> setInitParameters(java.util.Map<java.lang.String,java.lang.String> initParameters)
          Sets the given initialization parameters on the Servlet or Filter that is represented by this Registration.
 void setLoadOnStartup(int loadOnStartup)
           
 void setMultipartConfig(javax.servlet.MultipartConfigElement multipartConfig)
           
 void setRunAsRole(java.lang.String roleName)
           
 java.util.Set<java.lang.String> setServletSecurity(javax.servlet.ServletSecurityElement servletSecurity)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StandardWrapperFacade

public StandardWrapperFacade(StandardWrapper wrapper)
Create a new facede around a StandardWrapper.

Method Detail

getServletName

public java.lang.String getServletName()
Description copied from interface: javax.servlet.ServletConfig
Returns the name of this servlet instance. The name may be provided via server administration, assigned in the web application deployment descriptor, or for an unregistered (and thus unnamed) servlet instance it will be the servlet's class name.

Specified by:
getServletName in interface javax.servlet.ServletConfig
Returns:
the name of the servlet instance

getServletContext

public javax.servlet.ServletContext getServletContext()
Description copied from interface: javax.servlet.ServletConfig
Returns a reference to the ServletContext in which the caller is executing.

Specified by:
getServletContext in interface javax.servlet.ServletConfig
Returns:
a ServletContext object, used by the caller to interact with its servlet container
See Also:
ServletContext

getInitParameter

public java.lang.String getInitParameter(java.lang.String name)
Description copied from interface: javax.servlet.Registration
Gets the value of the initialization parameter with the given name that will be used to initialize the Servlet or Filter represented by this Registration object.

Specified by:
getInitParameter in interface javax.servlet.Registration
Specified by:
getInitParameter in interface javax.servlet.ServletConfig
Parameters:
name - the name of the initialization parameter whose value is requested
Returns:
the value of the initialization parameter with the given name, or null if no initialization parameter with the given name exists

getInitParameterNames

public java.util.Enumeration getInitParameterNames()
Description copied from interface: javax.servlet.ServletConfig
Returns the names of the servlet's initialization parameters as an Enumeration of String objects, or an empty Enumeration if the servlet has no initialization parameters.

Specified by:
getInitParameterNames in interface javax.servlet.ServletConfig
Returns:
an Enumeration of String objects containing the names of the servlet's initialization parameters

addMapping

public java.util.Set<java.lang.String> addMapping(java.lang.String... urlPatterns)
Description copied from interface: javax.servlet.ServletRegistration
Adds a servlet mapping with the given URL patterns for the Servlet represented by this ServletRegistration.

If any of the specified URL patterns are already mapped to a different Servlet, no updates will be performed.

If this method is called multiple times, each successive call adds to the effects of the former.

Specified by:
addMapping in interface javax.servlet.ServletRegistration
Parameters:
urlPatterns - the URL patterns of the servlet mapping
Returns:
the (possibly empty) Set of URL patterns that are already mapped to a different Servlet

setAsyncSupported

public void setAsyncSupported(boolean asyncSupported)

setDescription

public void setDescription(java.lang.String description)

setInitParameter

public boolean setInitParameter(java.lang.String name,
                                java.lang.String value)
Description copied from interface: javax.servlet.Registration
Sets the initialization parameter with the given name and value on the Servlet or Filter that is represented by this Registration.

Specified by:
setInitParameter in interface javax.servlet.Registration
Parameters:
name - the initialization parameter name
value - the initialization parameter value
Returns:
true if the update was successful, i.e., an initialization parameter with the given name did not already exist for the Servlet or Filter represented by this Registration, and false otherwise

setInitParameters

public java.util.Set<java.lang.String> setInitParameters(java.util.Map<java.lang.String,java.lang.String> initParameters)
Description copied from interface: javax.servlet.Registration
Sets the given initialization parameters on the Servlet or Filter that is represented by this Registration.

The given map of initialization parameters is processed by-value, i.e., for each initialization parameter contained in the map, this method calls Registration.setInitParameter(String,String). If that method would return false for any of the initialization parameters in the given map, no updates will be performed, and false will be returned. Likewise, if the map contains an initialization parameter with a null name or value, no updates will be performed, and an IllegalArgumentException will be thrown.

Specified by:
setInitParameters in interface javax.servlet.Registration
Parameters:
initParameters - the initialization parameters
Returns:
the (possibly empty) Set of initialization parameter names that are in conflict

setLoadOnStartup

public void setLoadOnStartup(int loadOnStartup)

getMappings

public java.util.Collection<java.lang.String> getMappings()
Description copied from interface: javax.servlet.ServletRegistration
Gets the currently available mappings of the Servlet represented by this ServletRegistration.

Any changes to the returned Collection must not affect this ServletRegistration.

Specified by:
getMappings in interface javax.servlet.ServletRegistration
Returns:
a (possibly empty) Collection of the currently available mappings of the Servlet represented by this ServletRegistration

getClassName

public java.lang.String getClassName()
Description copied from interface: javax.servlet.Registration
Gets the fully qualified class name of the Servlet or Filter that is represented by this Registration.

Specified by:
getClassName in interface javax.servlet.Registration
Returns:
the fully qualified class name of the Servlet or Filter that is represented by this Registration, or null if this Registration is preliminary

getInitParameters

public java.util.Map<java.lang.String,java.lang.String> getInitParameters()
Description copied from interface: javax.servlet.Registration
Gets an immutable (and possibly empty) Map containing the currently available initialization parameters that will be used to initialize the Servlet or Filter represented by this Registration object.

Specified by:
getInitParameters in interface javax.servlet.Registration
Returns:
Map containing the currently available initialization parameters that will be used to initialize the Servlet or Filter represented by this Registration object

getName

public java.lang.String getName()
Description copied from interface: javax.servlet.Registration
Gets the name of the Servlet or Filter that is represented by this Registration.

Specified by:
getName in interface javax.servlet.Registration
Returns:
the name of the Servlet or Filter that is represented by this Registration

getRunAsRole

public java.lang.String getRunAsRole()
Description copied from interface: javax.servlet.ServletRegistration
Gets the name of the runAs role of the Servlet represented by this ServletRegistration.

Specified by:
getRunAsRole in interface javax.servlet.ServletRegistration
Returns:
the name of the runAs role, or null if the Servlet is configured to run as its caller

setRunAsRole

public void setRunAsRole(java.lang.String roleName)

setServletSecurity

public java.util.Set<java.lang.String> setServletSecurity(javax.servlet.ServletSecurityElement servletSecurity)

setMultipartConfig

public void setMultipartConfig(javax.servlet.MultipartConfigElement multipartConfig)


Copyright © 2000-2009 Apache Software Foundation. All Rights Reserved.