net.sourceforge.stripes.controller
Class HttpCacheInterceptor
java.lang.Object
net.sourceforge.stripes.controller.HttpCacheInterceptor
- All Implemented Interfaces:
- Interceptor
@Intercepts(value=ResolutionExecution)
public class HttpCacheInterceptor
- extends Object
- implements Interceptor
Looks for an HttpCache
annotation on the event handler method, the ActionBean
class or the ActionBean
's superclasses. If an HttpCache
is found, then the
appropriate response headers are set to control client-side caching.
- Since:
- Stripes 1.5
- Author:
- Ben Gunter
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HttpCacheInterceptor
public HttpCacheInterceptor()
intercept
public Resolution intercept(ExecutionContext ctx)
throws Exception
- Description copied from interface:
Interceptor
- Invoked when intercepting the flow of execution.
- Specified by:
intercept
in interface Interceptor
- Parameters:
ctx
- the ExecutionContext of the request currently being processed
- Returns:
- the result of calling context.proceed(), or if the interceptor wishes to change
the flow of execution, a Resolution
- Throws:
Exception
- if any non-recoverable errors occur
getAnnotation
protected HttpCache getAnnotation(Method method,
Class<? extends ActionBean> beanClass)
- Look for a
HttpCache
annotation on the method first and then on the class and its
superclasses.
- Parameters:
method
- an event handler methodbeanClass
- the class to inspect for annotations if none is found on the method
- Returns:
- The first
HttpCache
annotation found. If none is found then null.
? Copyright 2005-2006, Stripes Development Team.