Examples of MethodInterceptor


Examples of org.aopalliance.intercept.MethodInterceptor

    // unit testing without the creation of Guice injectors.
    bindThriftDecorator(new LoggingInterceptor());

    // Note: it's important that the capability interceptor is only applied to AuroraAdmin.Iface
    // methods, and does not pick up methods on AuroraSchedulerManager.Iface.
    MethodInterceptor authInterceptor = new UserCapabilityInterceptor();
    requestInjection(authInterceptor);
    bindInterceptor(
        THRIFT_IFACE_MATCHER,
        GuiceUtils.interfaceMatcher(AuroraAdmin.Iface.class, true),
        authInterceptor);
View Full Code Here

Examples of org.apache.shiro.aop.MethodInterceptor

public class AopAllianceMethodInterceptorAdapterTest {
    @Test
    public void testInvoke() throws Throwable {
        MethodInvocation allianceInvocation = createMock(MethodInvocation.class);
        MethodInterceptor mockShiroInterceptor = createMock(MethodInterceptor.class);
        expect(mockShiroInterceptor.invoke(anyObject(AopAllianceMethodInvocationAdapter.class))).andAnswer(new IAnswer<Object>() {
            public Object answer() throws Throwable {
                return getCurrentArguments()[0];
            }
        });
        final Object expectedValue = new Object();
View Full Code Here

Examples of org.hibernate.repackage.cglib.proxy.MethodInterceptor

            return;
        }

        Enhancer enh = new Enhancer();
        enh.setInterfaces(new Class[] { BeanInterfaceHib.class });
        enh.setCallback(new MethodInterceptor() {
            @Override
            public Object intercept(Object obj, Method method,
                    Object[] args, MethodProxy proxy)
                            throws Throwable
            {
View Full Code Here

Examples of org.nutz.aop.MethodInterceptor

    if (interceptorName.startsWith("ioc:"))
      return ioc.get(MethodInterceptor.class, interceptorName.substring(4));
    try {
      if (singleton == false)
        return (MethodInterceptor) Mirror.me(Lang.loadClass(interceptorName)).born();
      MethodInterceptor methodInterceptor = cachedMethodInterceptor.get(interceptorName);
      if (methodInterceptor == null) {
        methodInterceptor = (MethodInterceptor) Mirror.me(Lang.loadClass(interceptorName)).born();
        cachedMethodInterceptor.put(interceptorName, methodInterceptor);
      }
      return methodInterceptor;
View Full Code Here

Examples of org.springframework.cglib.proxy.MethodInterceptor

      Enhancer enhancer = new Enhancer();
      enhancer.setSuperclass(fbClass);
      enhancer.setUseFactory(false);
      enhancer.setNamingPolicy(SpringNamingPolicy.INSTANCE);
      enhancer.setCallback(new MethodInterceptor() {
        @Override
        public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {
          if (method.getName().equals("getObject") && args.length == 0) {
            return beanFactory.getBean(beanName);
          }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.