Package org.apache.webbeans.intercept.webbeans

Examples of org.apache.webbeans.intercept.webbeans.WebBeansInterceptor


        beans.clear();

        //Adding interceptors to validate
        for (javax.enterprise.inject.spi.Interceptor<?> interceptor : manager.getInterceptors()) {
            WebBeansInterceptor wbInt = (WebBeansInterceptor) interceptor;
            beans.add(wbInt);
        }

        logger.debug("Validation of the interceptor's injection points has started.");
View Full Code Here


       
        //Adding interceptors to validate
        List<javax.enterprise.inject.spi.Interceptor<?>> interceptors = manager.getInterceptors();
        for(javax.enterprise.inject.spi.Interceptor interceptor : interceptors)
        {
            WebBeansInterceptor wbInt = (WebBeansInterceptor)interceptor;
            beans.add(wbInt);
        }
       
        logger.fine("Validation of the interceptor's injection points has started.");
       
View Full Code Here

        Iterator<Interceptor<?>> itSet = intsSet.iterator();

        List<Interceptor<?>> interceptorList = new ArrayList<Interceptor<?>>();
        while (itSet.hasNext())
        {
            WebBeansInterceptor interceptor = (WebBeansInterceptor) itSet.next();

            if (interceptor.intercepts(type))
            {
                interceptorList.add(interceptor);
            }

        }
View Full Code Here

     */
    public static void configureInterceptorClass(AbstractComponent<Object> delegate, Annotation[] interceptorBindingTypes)
    {
        logger.info("Configuring the Web Beans Interceptor Class : " + delegate.getReturnType().getName() + " started");

        WebBeansInterceptor interceptor = new WebBeansInterceptor(delegate);

        for (Annotation ann : interceptorBindingTypes)
        {
            interceptor.addInterceptorBindingType(ann.annotationType(), ann);
        }

        logger.info("Configuring the Web Beans Interceptor Class : " + delegate.getReturnType() + " ended");

        ManagerImpl.getManager().addInterceptor(interceptor);
View Full Code Here

    public static void addComponentInterceptors(Set<Interceptor> set, List<InterceptorData> stack)
    {
        Iterator<Interceptor> it = set.iterator();
        while (it.hasNext())
        {
            WebBeansInterceptor interceptor = (WebBeansInterceptor) it.next();

            // interceptor binding
            WebBeansUtil.configureInterceptorMethods(interceptor, interceptor.getClazz(), AroundInvoke.class, true, false, stack, null, true);
            WebBeansUtil.configureInterceptorMethods(interceptor, interceptor.getClazz(), PostConstruct.class, true, false, stack, null, true);
            WebBeansUtil.configureInterceptorMethods(interceptor, interceptor.getClazz(), PreDestroy.class, true, false, stack, null, true);

        }

    }
View Full Code Here

                Set<Interceptor> setInterceptors = findDeployedWebBeansInterceptor(result);
                Iterator<Interceptor> it = setInterceptors.iterator();

                while (it.hasNext())
                {
                    WebBeansInterceptor interceptor = (WebBeansInterceptor) it.next();

                    WebBeansUtil.configureInterceptorMethods(interceptor, interceptor.getClazz(), AroundInvoke.class, false, true, stack, method, true);
                    WebBeansUtil.configureInterceptorMethods(interceptor, interceptor.getClazz(), PostConstruct.class, false, true, stack, method, true);
                    WebBeansUtil.configureInterceptorMethods(interceptor, interceptor.getClazz(), PreDestroy.class, false, true, stack, method, true);
                }

            }
        }
View Full Code Here

    public static Set<Interceptor> findDeployedWebBeansInterceptor(Annotation[] anns)
    {
        Set<Interceptor> set = new HashSet<Interceptor>();

        Iterator<Interceptor> it = getWebBeansInterceptors().iterator();
        WebBeansInterceptor interceptor = null;

        List<Class<? extends Annotation>> bindingTypes = new ArrayList<Class<? extends Annotation>>();
        List<Annotation> listAnnot = new ArrayList<Annotation>();
        for (Annotation ann : anns)
        {
            bindingTypes.add(ann.annotationType());
            listAnnot.add(ann);
        }

        while (it.hasNext())
        {
            interceptor = (WebBeansInterceptor) it.next();

            if (interceptor.isBindingTypesExist(bindingTypes, listAnnot))
            {
                set.add(interceptor);
                set.addAll(interceptor.getMetaInceptors());
            }
        }

        return set;
    }
View Full Code Here

        Iterator<Interceptor> itSet = intsSet.iterator();

        List<Interceptor> interceptorList = new ArrayList<Interceptor>();
        while (itSet.hasNext())
        {
            WebBeansInterceptor interceptor = (WebBeansInterceptor) itSet.next();

            if (interceptor.getMethod(type) != null)
            {
                interceptorList.add(interceptor);
            }

        }
View Full Code Here

        {
            return 0;
        }
        else
        {
            WebBeansInterceptor interceptorFirst = (WebBeansInterceptor) o1.getWebBeansInterceptor();
            WebBeansInterceptor interceptorSecond = (WebBeansInterceptor) o2.getWebBeansInterceptor();

            if (interceptorFirst == null && interceptorSecond == null)
            {
                return 0;
            }

            if (interceptorFirst == null)
            {

                return 1;
            }
            else if (interceptorSecond == null)
            {
                return -1;
            }
            else
            {
                Class<?> o1Clazz = interceptorFirst.getClazz();
                Class<?> o2Clazz = interceptorSecond.getClazz();

                return InterceptorsManager.getInstance().compare(o1Clazz, o2Clazz);
            }

        }
View Full Code Here

        Iterator<Interceptor> it = setInterceptors.iterator();

        List<InterceptorData> stack = component.getInterceptorStack();
        while (it.hasNext())
        {
            WebBeansInterceptor interceptor = (WebBeansInterceptor) it.next();

            WebBeansUtil.configureInterceptorMethods(interceptor, interceptor.getClazz(), AroundInvoke.class, false, true, stack, interceptorMethod, true);
            WebBeansUtil.configureInterceptorMethods(interceptor, interceptor.getClazz(), PostConstruct.class, false, true, stack, interceptorMethod, true);
            WebBeansUtil.configureInterceptorMethods(interceptor, interceptor.getClazz(), PreDestroy.class, false, true, stack, interceptorMethod, true);
        }

    }
View Full Code Here

TOP

Related Classes of org.apache.webbeans.intercept.webbeans.WebBeansInterceptor

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.