Implementations of Wrapper are responsible for managing the servlet life cycle for their underlying servlet class, including calling init() and destroy() at appropriate times.
The parent Container attached to a Wrapper will generally be an implementation of Context, representing the servlet context (and therefore the web application) within which this servlet executes.
Child Containers are not allowed on Wrapper implementations, so the
addChild() method should throw an
IllegalArgumentException.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | ADD_MAPPING_EVENT
Container event for adding a wrapper. |
| public static final String | REMOVE_MAPPING_EVENT
Container event for removing a wrapper. |
| Modifier and Type | Method and Description |
|---|---|
| public void | addInitParameter(String
Name of this initialization parameter to add name, String Value of this initialization parameter to add value)Add a new servlet initialization parameter for this servlet. |
| public void | |
| public void | addSecurityReference(String
Role name used within this servlet name, String Role name used within the web application link)Add a new security role reference record to the set of records for this servlet. |
| public Servlet | Returns: a new Servlet instanceAllocate an initialized instance of this Servlet that is ready to have
its |
| public void | deallocate(Servlet
The servlet to be returned servlet)Decrement the allocation count for the servlet instance. |
| public String | Returns: the value for the specified initialization parameter name, if any; otherwise returnnull.Name of the requested initialization parameter name)
|
| public String[] | |
| public String[] | |
| public String | Returns: the security role link for the specified security role reference name, if any; otherwise returnnull.Security role reference used within this servlet name)
|
| public String[] | Returns: the set of security role reference names associated with this servlet, if any; otherwise return a zero-length array.
|
| public long | Returns: 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.
|
| public int | Returns: the load-on-startup order value (negative value means load on first call).
|
| public MultipartConfigElement | Returns: the multi-part configuration for the associated Servlet. If no multi-part configuration has been defined, thennull will be
returned.
|
| public String | |
| public Servlet | |
| public String | |
| public String[] | Returns: Array of names of the methods supported by the underlying servletGets the names of the methods supported by the underlying servlet. |
| public void | |
| public boolean | Returns: true if the Servlet supports asyncDoes the associated Servlet support async processing? |
| public boolean | |
| public boolean | Returns: true if the Servlet can be overridden in a ServletContainerInitializerIs the Servlet overridable by a ServletContainerInitializer? |
| public boolean | |
| public void | load()
Load and initialize an instance of this Servlet, if there is not already at least one initialized instance. |
| public void | removeInitParameter(String
Name of the initialization parameter to remove name)Remove the specified initialization parameter from this Servlet. |
| public void | |
| public void | removeSecurityReference(String
Security role used within this servlet to be removed name)Remove any security role reference for the specified role name. |
| public void | setAsyncSupported(boolean
the new value asyncSupport)Set the async support for the associated Servlet. |
| public void | setAvailable(long
The new available date/time available)Set the available date/time for this servlet, in milliseconds since the epoch. |
| public void | |
| public void | setLoadOnStartup(int
New load-on-startup value value)Set the load-on-startup order value (negative value means load on first call). |
| public void | setMultipartConfigElement(MultipartConfigElement
The configuration associated with the Servlet multipartConfig)Set the multi-part configuration for the associated Servlet. |
| public void | |
| public void | |
| public void | |
| public void | setServletClass(String
Servlet class name servletClass)Set the fully qualified servlet class name for this servlet. |
| public void | unavailable(UnavailableException
The exception that occurred, or unavailable)null
to mark this Servlet as permanently unavailableProcess an UnavailableException, marking this Servlet as unavailable for the specified amount of time. |
| public void | unload()
Unload all initialized instances of this servlet, after calling the
|
| ADD_MAPPING_EVENT | back to summary |
|---|---|
| public static final String ADD_MAPPING_EVENT Container event for adding a wrapper. | |
| REMOVE_MAPPING_EVENT | back to summary |
|---|---|
| public static final String REMOVE_MAPPING_EVENT Container event for removing a wrapper. | |
| addInitParameter | back to summary |
|---|---|
| public void addInitParameter(String name, String value) Add a new servlet initialization parameter for this servlet. | |
| addMapping | back to summary |
|---|---|
| public void addMapping(String mapping) Add a mapping associated with the Wrapper.
| |
| addSecurityReference | back to summary |
|---|---|
| public void addSecurityReference(String name, String link) Add a new security role reference record to the set of records for this servlet. | |
| allocate | back to summary |
|---|---|
| public Servlet allocate() throws ServletException Allocate an initialized instance of this Servlet that is ready to have
its
| |
| deallocate | back to summary |
|---|---|
| public void deallocate(Servlet servlet) throws ServletException Decrement the allocation count for the servlet instance.
| |
| findInitParameter | back to summary |
|---|---|
| public String findInitParameter(String name) | |
| findInitParameters | back to summary |
|---|---|
public String[] findInitParameters()
| |
| findMappings | back to summary |
|---|---|
public String[] findMappings()
| |
| findSecurityReference | back to summary |
|---|---|
| public String findSecurityReference(String name) | |
| findSecurityReferences | back to summary |
|---|---|
public String[] findSecurityReferences()
| |
| getAvailable | back to summary |
|---|---|
public long getAvailable()
| |
| getLoadOnStartup | back to summary |
|---|---|
public int getLoadOnStartup()
| |
| getMultipartConfigElement | back to summary |
|---|---|
public MultipartConfigElement getMultipartConfigElement()
| |
| getRunAs | back to summary |
|---|---|
public String getRunAs()
| |
| getServlet | back to summary |
|---|---|
public Servlet getServlet()
| |
| getServletClass | back to summary |
|---|---|
public String getServletClass()
| |
| getServletMethods | back to summary |
|---|---|
| public String[] getServletMethods() throws ServletException Gets the names of the methods supported by the underlying servlet. This is the same set of methods included in the Allow response header in response to an OPTIONS request method processed by the underlying servlet.
| |
| incrementErrorCount | back to summary |
|---|---|
| public void incrementErrorCount() Increment the error count value used when monitoring. | |
| isAsyncSupported | back to summary |
|---|---|
| public boolean isAsyncSupported() Does the associated Servlet support async processing? Defaults to
| |
| isEnabled | back to summary |
|---|---|
| public boolean isEnabled() Is the associated Servlet enabled? Defaults to
| |
| isOverridable | back to summary |
|---|---|
| public boolean isOverridable() Is the Servlet overridable by a ServletContainerInitializer?
| |
| isUnavailable | back to summary |
|---|---|
public boolean isUnavailable()
| |
| load | back to summary |
|---|---|
| public void load() throws 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 | back to summary |
|---|---|
| public void removeInitParameter(String name) Remove the specified initialization parameter from this Servlet.
| |
| removeMapping | back to summary |
|---|---|
| public void removeMapping(String mapping) Remove a mapping associated with the wrapper.
| |
| removeSecurityReference | back to summary |
|---|---|
| public void removeSecurityReference(String name) Remove any security role reference for the specified role name.
| |
| setAsyncSupported | back to summary |
|---|---|
| public void setAsyncSupported(boolean asyncSupport) Set the async support for the associated Servlet.
| |
| setAvailable | back to summary |
|---|---|
| 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. A value equal to Long.MAX_VALUE is considered to mean that unavailability is permanent.
| |
| setEnabled | back to summary |
|---|---|
| public void setEnabled(boolean enabled) Sets the enabled attribute for the associated servlet.
| |
| setLoadOnStartup | back to summary |
|---|---|
| public void setLoadOnStartup(int value) Set the load-on-startup order value (negative value means load on first call).
| |
| setMultipartConfigElement | back to summary |
|---|---|
| public void setMultipartConfigElement(MultipartConfigElement multipartConfig) Set the multi-part configuration for the associated Servlet. To clear the
multi-part configuration specify
| |
| setOverridable | back to summary |
|---|---|
| public void setOverridable(boolean overridable) Sets the overridable attribute for this Servlet.
| |
| setRunAs | back to summary |
|---|---|
| public void setRunAs(String runAs) Set the run-as identity for this servlet.
| |
| setServlet | back to summary |
|---|---|
| public void setServlet(Servlet servlet) Set the associated Servlet instance
| |
| setServletClass | back to summary |
|---|---|
| public void setServletClass(String servletClass) Set the fully qualified servlet class name for this servlet.
| |
| unavailable | back to summary |
|---|---|
| public void unavailable(UnavailableException unavailable) Process an UnavailableException, marking this Servlet as unavailable for the specified amount of time.
| |
| unload | back to summary |
|---|---|
| public void unload() throws ServletException Unload all initialized instances of this servlet, after calling the
| |