Class CacheResultMethodAdvice
- java.lang.Object
-
- org.jsr107.ri.annotations.AbstractCacheInterceptor<I>
-
- org.jsr107.ri.annotations.AbstractKeyedCacheInterceptor<I,org.jsr107.ri.annotations.CacheResultMethodDetails>
-
- org.jsr107.ri.annotations.AbstractCacheResultInterceptor<MethodInvocation>
-
- org.apache.tapestry5.jcache.internal.CacheResultMethodAdvice
-
- All Implemented Interfaces:
CacheMethodAdvice
,MethodAdvice
public class CacheResultMethodAdvice extends org.jsr107.ri.annotations.AbstractCacheResultInterceptor<MethodInvocation> implements CacheMethodAdvice
-
-
Constructor Summary
Constructors Constructor Description CacheResultMethodAdvice(org.jsr107.ri.annotations.CacheContextSource<MethodInvocation> cacheContextSource)
Single constructor of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
advise(MethodInvocation invocation)
Advise the method, usually invokingMethodInvocation.proceed()
at some point.org.jsr107.ri.annotations.InterceptorType
getInterceptorType()
protected java.lang.Object
proceed(MethodInvocation invocation)
-
Methods inherited from class org.jsr107.ri.annotations.AbstractCacheResultInterceptor
cacheException, cacheResult, checkForCachedException, getExceptionCache
-
-
-
-
Constructor Detail
-
CacheResultMethodAdvice
public CacheResultMethodAdvice(org.jsr107.ri.annotations.CacheContextSource<MethodInvocation> cacheContextSource)
Single constructor of this class.
-
-
Method Detail
-
getInterceptorType
public org.jsr107.ri.annotations.InterceptorType getInterceptorType()
- Specified by:
getInterceptorType
in interfaceCacheMethodAdvice
- Returns:
- The type of intereceptor
-
advise
public void advise(MethodInvocation invocation)
Description copied from interface:MethodAdvice
Advise the method, usually invokingMethodInvocation.proceed()
at some point. The advice is free to inspect and even replace parameters. Most Aspects will then invokeMethodInvocation.proceed()
. The advice may then inspect and replace any checked thrown exceptions. Some advice (for example, caching) may selectively decide to bypass the invocation entirely, and instead invoke some other method or otherwise set a return value or thrown exception.- Specified by:
advise
in interfaceMethodAdvice
- Parameters:
invocation
- identifies the method being invoked, including parameters
-
proceed
protected java.lang.Object proceed(MethodInvocation invocation) throws java.lang.Throwable
- Specified by:
proceed
in classorg.jsr107.ri.annotations.AbstractCacheInterceptor<MethodInvocation>
- Throws:
java.lang.Throwable
-
-