View Javadoc

1   package com.atlassian.plugins.rest.common.interceptor.impl.test;
2   
3   import com.atlassian.plugins.rest.common.interceptor.MethodInvocation;
4   import com.atlassian.plugins.rest.common.interceptor.ResourceInterceptor;
5   
6   import java.lang.reflect.InvocationTargetException;
7   
8   public class MyInterceptor implements ResourceInterceptor {
9       private boolean called;
10  
11      public void intercept(MethodInvocation invocation) throws IllegalAccessException, InvocationTargetException {
12          called = true;
13          invocation.invoke();
14      }
15  
16      public boolean isCalled() {
17          return called;
18      }
19  }