public class JohnsonServletFilterModuleContainerFilter
extends com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter
ServletFilterModuleContainerFilter to bypass servlet-provided filters when
Johnson events are present.
When the system is Johnsoned, the exact set of resources that are available is unknown. In some cases, that can cause plugin-provided filters which attempt to access those resources to fail in an unexpected ways. That, in turn can block access to Johnson's error page, or even hang request threads. Replacing the standard filter with this Johnson-aware version ensures servlet-provided filters are automatically bypassed while Johnson events are present.
| Constructor and Description |
|---|
JohnsonServletFilterModuleContainerFilter() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
bypassFilters()
Determines whether plugin-provided filters should be bypassed.
|
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
Checks whether plugin-provided filters should be
bypassed and, if so, directly
invokes the FilterChain; otherwise, processes super.doFilter normally. |
protected JohnsonEventContainer |
getEventContainer()
|
public JohnsonServletFilterModuleContainerFilter()
public void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws IOException,
javax.servlet.ServletException
bypassed and, if so, directly
invokes the FilterChain; otherwise, processes super.doFilter normally.doFilter in interface javax.servlet.FilterdoFilter in class com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilterrequest - the requestresponse - the responsechain - the remaining filter chainIOException - if thrown by the base class, or the FilterChainjavax.servlet.ServletException - if thrown by the base class, or the FilterChainprotected boolean bypassFilters()
container.
Applications can override this method in subclasses to apply a more specific set of restrictions. For example, they could choose to allow plugin-provided filters to be applied in specific Johnson states, or based on other knowledge of the application as a whole.
true if plugin-provided filters should be bypassed; otherwise, false to apply
plugin-provided filters normallyprotected JohnsonEventContainer getEventContainer()
JohnsonEventContainerCopyright © 2017 Atlassian. All rights reserved.