org.xwiki.wysiwyg.server.filter
Class XWikiContextInitializationFilter
java.lang.Object
org.xwiki.wysiwyg.server.filter.XWikiContextInitializationFilter
- All Implemented Interfaces:
- javax.servlet.Filter
public class XWikiContextInitializationFilter
- extends Object
- implements javax.servlet.Filter
This filter can be used to initialize the XWiki context before processing a request.
- Version:
- $Id: 26b019c862930400f009471715aca09109d704bd $
|
Method Summary |
protected void |
cleanupComponents()
We must ensure we clean the ThreadLocal variables located in the Container and Execution components as otherwise
we will have a potential memory leak. |
void |
destroy()
|
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
|
void |
init(javax.servlet.FilterConfig filterConfig)
|
protected void |
initializeContainerComponent(com.xpn.xwiki.XWikiContext context)
|
protected void |
initializeXWikiContext(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
Initializes the XWiki context. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XWikiContextInitializationFilter
public XWikiContextInitializationFilter()
destroy
public void destroy()
- Specified by:
destroy in interface javax.servlet.Filter
doFilter
public void doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain)
throws IOException,
javax.servlet.ServletException
- Specified by:
doFilter in interface javax.servlet.Filter
- Throws:
IOException
javax.servlet.ServletException
init
public void init(javax.servlet.FilterConfig filterConfig)
throws javax.servlet.ServletException
- Specified by:
init in interface javax.servlet.Filter
- Throws:
javax.servlet.ServletException
initializeXWikiContext
protected void initializeXWikiContext(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response)
throws javax.servlet.ServletException
- Initializes the XWiki context.
- Parameters:
request - the request being processedresponse - the response
- Throws:
javax.servlet.ServletException - if the initialization fails
initializeContainerComponent
protected void initializeContainerComponent(com.xpn.xwiki.XWikiContext context)
throws javax.servlet.ServletException
- Parameters:
context - the XWiki context
- Throws:
javax.servlet.ServletException - if the container component initialization fails
cleanupComponents
protected void cleanupComponents()
- We must ensure we clean the ThreadLocal variables located in the Container and Execution components as otherwise
we will have a potential memory leak.
Copyright © 2004-2012 XWiki. All Rights Reserved.