|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectro.isdc.wro.http.WroFilter
public class WroFilter
Main entry point. Perform the request processing by identifying the type of the requested resource. Depending on the way it is configured.
| Field Summary | |
|---|---|
static String |
API_RELOAD_CACHE
API - reload cache method call |
static String |
API_RELOAD_MODEL
API - reload model method call |
static String |
PATH_API
wro API mapping path. |
| Constructor Summary | |
|---|---|
WroFilter()
|
|
| Method Summary | |
|---|---|
void |
destroy()
|
void |
doFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res,
javax.servlet.FilterChain chain)
|
protected void |
doInit(javax.servlet.FilterConfig config)
Custom filter initialization - can be used for extended classes. |
protected MBeanServer |
getMBeanServer()
Override this method if you want to provide a different MBeanServer. |
WroConfiguration |
getWroConfiguration()
|
protected WroManagerFactory |
getWroManagerFactory()
Factory method for WroManagerFactory. |
void |
init(javax.servlet.FilterConfig config)
|
protected String |
newMBeanName()
|
protected ObjectFactory<WroConfiguration> |
newWroConfigurationFactory()
|
protected WroManagerFactory |
newWroManagerFactory()
|
protected void |
onRequestProcessed()
Useful for unit tests to check the post processing. |
protected void |
onRuntimeException(RuntimeException e,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain)
Invoked when a RuntimeException is thrown. |
protected void |
setResponseHeaders(javax.servlet.http.HttpServletResponse response)
Method called for each request and responsible for setting response headers, used mostly for cache control. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PATH_API
public static final String API_RELOAD_CACHE
public static final String API_RELOAD_MODEL
| Constructor Detail |
|---|
public WroFilter()
| Method Detail |
|---|
protected ObjectFactory<WroConfiguration> newWroConfigurationFactory()
WroConfigurationFactory used to create a WroConfiguration object.
public final void init(javax.servlet.FilterConfig config)
throws javax.servlet.ServletException
init in interface javax.servlet.Filterjavax.servlet.ServletExceptionprotected String newMBeanName()
protected MBeanServer getMBeanServer()
MBeanServer to use for JMX.
protected void doInit(javax.servlet.FilterConfig config)
throws javax.servlet.ServletException
javax.servlet.ServletExceptionFilter.init(FilterConfig).
public final void doFilter(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res,
javax.servlet.FilterChain chain)
throws IOException,
javax.servlet.ServletException
doFilter in interface javax.servlet.FilterIOException
javax.servlet.ServletExceptionprotected void onRequestProcessed()
protected void onRuntimeException(RuntimeException e,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain chain)
RuntimeException is thrown. Allows custom exception handling. The default implementation
redirects to 404 for a specific WroRuntimeException exception when in DEPLOYMENT mode.
e - RuntimeException thrown during request processing.protected void setResponseHeaders(javax.servlet.http.HttpServletResponse response)
response - HttpServletResponse object.protected WroManagerFactory getWroManagerFactory()
WroManagerFactory. Override this method, in order to change the way filter use factory.
WroManagerFactory object.protected WroManagerFactory newWroManagerFactory()
WroManagerFactory when none is provided explicitly through
wroConfiguration option.public final WroConfiguration getWroConfiguration()
WroConfiguration associated with this filter instance.public void destroy()
destroy in interface javax.servlet.Filter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||