public class TapestryFilter extends Object implements Filter
tapestry.execution-mode
(with default value "production"). This property is a comma-separated list of execution modes.
For each mode, an additional init parameter is checked for:
tapestry.mode-modules
; this is a comma-separated list of module class names
to load. In this way, more precise control over the available modules can be obtained which is
often needed during testing.Modifier and Type | Field and Description |
---|---|
static String |
REGISTRY_CONTEXT_NAME
Key under which the Tapestry IoC
Registry is stored in the
ServletContext. |
Constructor and Description |
---|
TapestryFilter() |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Shuts down and discards the registry.
|
protected void |
destroy(Registry registry)
Invoked from
destroy() to allow subclasses to add additional shutdown logic to the
filter. |
void |
doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain) |
protected FilterConfig |
getFilterConfig() |
void |
init(FilterConfig filterConfig)
Initializes the filter using the
TapestryAppInitializer . |
protected void |
init(Registry registry)
Invoked from
init(FilterConfig) after the Registry has been created, to allow any
additional
initialization to occur. |
protected Class[] |
provideExtraModuleClasses(ServletContext context)
Overridden in subclasses to provide additional module classes beyond those normally located.
|
protected ModuleDef[] |
provideExtraModuleDefs(ServletContext context)
Overridden in subclasses to provide additional module definitions beyond those normally
located.
|
public static final String REGISTRY_CONTEXT_NAME
Registry
is stored in the
ServletContext. This
allows other code, beyond Tapestry, to obtain the Registry and, from it, any Tapestry
services. Such code should
be careful about invoking Registry.cleanupThread()
appropriately.public TapestryFilter()
public final void init(FilterConfig filterConfig) throws ServletException
TapestryAppInitializer
. The application name is the
capitalization of
the filter name (as specified in web.xml).init
in interface Filter
ServletException
protected final FilterConfig getFilterConfig()
protected void init(Registry registry) throws ServletException
init(FilterConfig)
after the Registry has been created, to allow any
additional
initialization to occur. This implementation does nothing, and my be overridden in subclasses.registry
- from which services may be extractedServletException
protected ModuleDef[] provideExtraModuleDefs(ServletContext context)
protected Class[] provideExtraModuleClasses(ServletContext context)
public final void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
doFilter
in interface Filter
IOException
ServletException
public final void destroy()
destroy(org.apache.tapestry5.ioc.Registry)
to allow
subclasses to perform any shutdown logic, then shuts down the registry, and removes it from
the ServletContext.5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.