1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| |
8 |
| package org.jboss.cache.pojo.interceptors; |
9 |
| |
10 |
| import org.apache.commons.logging.Log; |
11 |
| import org.apache.commons.logging.LogFactory; |
12 |
| import org.jboss.aop.advice.Interceptor; |
13 |
| import org.jboss.aop.joinpoint.MethodInvocation; |
14 |
| import org.jboss.cache.CacheSPI; |
15 |
| import org.jboss.cache.InvocationContext; |
16 |
| import org.jboss.cache.pojo.impl.PojoCacheImpl; |
17 |
| |
18 |
| |
19 |
| |
20 |
| |
21 |
| |
22 |
| |
23 |
| |
24 |
| public abstract class AbstractInterceptor implements Interceptor |
25 |
| { |
26 |
| protected final Log log = LogFactory.getLog(AbstractInterceptor.this.getClass()); |
27 |
| |
28 |
0
| protected InvocationContext getInvocationContext(MethodInvocation in)
|
29 |
| { |
30 |
0
| return ((PojoCacheImpl) in.getTargetObject()).getCacheSPI().getInvocationContext();
|
31 |
| } |
32 |
| |
33 |
25470
| protected CacheSPI getCache(MethodInvocation in)
|
34 |
| { |
35 |
25470
| return ((PojoCacheImpl) in.getTargetObject()).getCacheSPI();
|
36 |
| } |
37 |
| |
38 |
0
| public String getName()
|
39 |
| { |
40 |
0
| return this.getClass().getName();
|
41 |
| } |
42 |
| } |