Package org.jboss.invocation

Examples of org.jboss.invocation.SimpleInterceptorInstanceFactory


            //the time the factory is called.

            final List<LifecycleInterceptorFactory> postConstructs = createLifecycleInterceptors(interceptor.getPostConstructs(), module, index);
            final List<LifecycleInterceptorFactory> preDestroys = createLifecycleInterceptors(interceptor.getPreDestroys(), module, index);

            final InjectingInterceptorInstanceFactory instanceFactory = new InjectingInterceptorInstanceFactory(new SimpleInterceptorInstanceFactory(interceptorClass), interceptorClass, configuration, postConstructs, preDestroys);
            //we need to create an Interceptor for every around invoke method
            for (InterceptorMethodDescription aroundInvoke : interceptor.getAroundInvokeMethods()) {
                final Class<?> methodDeclaringClass = module.getClassLoader().loadClass(aroundInvoke.getDeclaringClass());
                final ClassReflectionIndex<?> methodDeclaringClassIndex = index.getClassIndex(methodDeclaringClass);
                //we know what the signature is
View Full Code Here


    private static LifecycleInterceptorFactory createInterceptorLifecycle(final ClassLoader classLoader, final InterceptorMethodDescription lifecycleConfiguration, final DeploymentReflectionIndex deploymentReflectionIndex) throws NoSuchMethodException, ClassNotFoundException {
        final Class<?> declaringClass = classLoader.loadClass(lifecycleConfiguration.getDeclaringClass());
        final Class<?> instanceClass = classLoader.loadClass(lifecycleConfiguration.getInstanceClass());
        final Method lifecycleMethod = deploymentReflectionIndex.getClassIndex(declaringClass).getMethod(void.class, lifecycleConfiguration.getIdentifier().getName(), InvocationContext.class);
        final MethodInterceptorFactory delegate = new MethodInterceptorFactory(new SimpleInterceptorInstanceFactory(instanceClass), lifecycleMethod);
        return new LifecycleInterceptorFactory(delegate, lifecycleMethod);
    }
View Full Code Here

            final Class<?> interceptorClass = module.getClassLoader().loadClass(interceptor.getInterceptorClassName());
            final List<InterceptorFactory> postConstruct = createLifecycleInterceptors(interceptor.getInterceptorPostConstructs(), module, index);
            final List<InterceptorFactory> preDestroy = createLifecycleInterceptors(interceptor.getInterceptorPreDestroys(), module, index);
            postConstructInterceptors.addAll(postConstruct);
            preDestroyInterceptors.addAll(preDestroy);
            final InjectingInterceptorInstanceFactory instanceFactory = new InjectingInterceptorInstanceFactory(new SimpleInterceptorInstanceFactory(interceptorClass),interceptorClass,configuration);
            interceptorFactories.put(interceptor.getInterceptorClassName(),instanceFactory);
            return instanceFactory;
        } catch (ClassNotFoundException e) {
            throw new DeploymentUnitProcessingException("Failed to load interceptor class " + interceptor.getInterceptorClassName());
        }
View Full Code Here

    private static MethodAwareInterceptorFactory createInterceptorLifecycle(final ClassLoader classLoader, final InterceptorMethodDescription lifecycleConfiguration, final DeploymentReflectionIndex deploymentReflectionIndex) throws NoSuchMethodException, ClassNotFoundException {
        final Class<?> declaringClass = classLoader.loadClass(lifecycleConfiguration.getDeclaringClass());
        final Class<?> instanceClass = classLoader.loadClass(lifecycleConfiguration.getInstanceClass());
        final Method lifecycleMethod = deploymentReflectionIndex.getClassIndex(declaringClass).getMethod(void.class, lifecycleConfiguration.getIdentifier().getName(), InvocationContext.class);
        final MethodInterceptorFactory delegate = new MethodInterceptorFactory(new SimpleInterceptorInstanceFactory(instanceClass), lifecycleMethod);
        return new MethodAwareInterceptorFactory(delegate, lifecycleMethod);
    }
View Full Code Here

TOP

Related Classes of org.jboss.invocation.SimpleInterceptorInstanceFactory

Copyright © 2018 www.massapicom. 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.