hu.midori.kosmos.server
Class MethodResultCacheInterceptor

java.lang.Object
  extended by hu.midori.kosmos.server.MethodResultCacheInterceptor
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor

public class MethodResultCacheInterceptor
extends java.lang.Object
implements org.aopalliance.intercept.MethodInterceptor

Intercepts the service method calls and caches the result.

Implementation is based on: http://opensource2.atlassian.com/confluence/spring/display/DISC/Caching+the+result+of+methods+using+Spring+and+EHCache

Version:
$Id$
Author:
Aron Gombas

Constructor Summary
MethodResultCacheInterceptor()
           
 
Method Summary
 java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
          Caches the return value of the intercepted method.
 void setCache(net.sf.ehcache.Cache cache)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodResultCacheInterceptor

public MethodResultCacheInterceptor()
Method Detail

setCache

public void setCache(net.sf.ehcache.Cache cache)

invoke

public java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
                        throws java.lang.Throwable
Caches the return value of the intercepted method.

Specified by:
invoke in interface org.aopalliance.intercept.MethodInterceptor
Throws:
java.lang.Throwable