org.apache.jetspeed.components.interceptors
Class CachingInterceptor

java.lang.Object
  extended by org.apache.jetspeed.components.interceptors.AbstractCacheInterceptor
      extended by org.apache.jetspeed.components.interceptors.CachingInterceptor
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor

public class CachingInterceptor
extends AbstractCacheInterceptor

CacheInterceptor

AoP Interceptor that can be used for generalized caching. The only requirement is that intercepted methods must receive at least one (1) arguments.

CacheInterceptor ALWAYS use the first argument in the method to build the unique cache key.

Version:
$Id: CachingInterceptor.java 516448 2007-03-09 16:25:47Z ate $
Author:
Scott T. Weaver

Field Summary
 
Fields inherited from class org.apache.jetspeed.components.interceptors.AbstractCacheInterceptor
cache, uniquePrefix
 
Constructor Summary
CachingInterceptor(org.apache.jetspeed.cache.general.GeneralCache cache)
           
 
Method Summary
protected  Object doCacheOperation(org.aopalliance.intercept.MethodInvocation mi, String uniqueKey)
           doCacheOperation
 
Methods inherited from class org.apache.jetspeed.components.interceptors.AbstractCacheInterceptor
buildKey, invoke
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingInterceptor

public CachingInterceptor(org.apache.jetspeed.cache.general.GeneralCache cache)
Parameters:
cache -
Method Detail

doCacheOperation

protected Object doCacheOperation(org.aopalliance.intercept.MethodInvocation mi,
                                  String uniqueKey)
                           throws Throwable

doCacheOperation

Specified by:
doCacheOperation in class AbstractCacheInterceptor
Parameters:
mi -
uniqueKey -
Returns:
Throws:
Throwable


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.