private InterceptorBindings getInterceptorBindings(final String ejbName, final BeanManagerImpl manager) { InterceptorBindings retVal = null; if (ejbName != null) { retVal = interceptorSupport.getInterceptorBindings(ejbName, manager); } else { // This is a managed bean SlimAnnotatedType<?> type = (SlimAnnotatedType<?>) manager.createAnnotatedType(componentClass); if (!manager.getInterceptorModelRegistry().containsKey(type)) { EnhancedAnnotatedType<?> enhancedType = manager.getServices().get(ClassTransformer.class).getEnhancedAnnotatedType(type); InterceptionModelInitializer.of(manager, enhancedType, null).init(); } InterceptionModel model = manager.getInterceptorModelRegistry().get(type); if (model != null) { retVal = new InterceptorBindingsAdapter(manager.getInterceptorModelRegistry().get(type)); } } return retVal != null ? retVal : NullInterceptorBindings.INSTANCE; }
@Override public List<Interceptor<?>> getLifecycleInterceptors(InterceptionType interceptionType) { if (interceptionType == null) { throw BeanLogger.LOG.interceptionTypeNull(); } org.jboss.weld.interceptor.spi.model.InterceptionType internalInterceptionType = org.jboss.weld.interceptor.spi.model.InterceptionType.valueOf(interceptionType.name()); if (!internalInterceptionType.isLifecycleCallback()) { throw BeanLogger.LOG.interceptionTypeNotLifecycle(interceptionType.name()); } if (internalInterceptionType.equals(org.jboss.weld.interceptor.spi.model.InterceptionType.AROUND_CONSTRUCT)) { return extractCdiInterceptors(interceptionModel.getConstructorInvocationInterceptors()); } return extractCdiInterceptors(interceptionModel.getInterceptors(internalInterceptionType, null)); }
@Override public List<Interceptor<?>> getMethodInterceptors(InterceptionType interceptionType, Method method) { if (interceptionType == null) { throw BeanLogger.LOG.interceptionTypeNull(); } if (method == null) { throw BeanLogger.LOG.methodNull(); } org.jboss.weld.interceptor.spi.model.InterceptionType internalInterceptionType = org.jboss.weld.interceptor.spi.model.InterceptionType.valueOf(interceptionType.name()); if (internalInterceptionType.isLifecycleCallback()) { throw BeanLogger.LOG.interceptionTypeLifecycle(interceptionType.name()); } return extractCdiInterceptors(interceptionModel.getInterceptors(internalInterceptionType, method)); }
@Override public Collection<Interceptor<?>> getAllInterceptors() { Set<? extends InterceptorClassMetadata<?>> interceptorMetadataSet = interceptionModel.getAllInterceptors(); return extractCdiInterceptors(interceptorMetadataSet); }
@Override public List<Interceptor<?>> getLifecycleInterceptors(InterceptionType interceptionType) { if (interceptionType == null) { throw BeanLogger.LOG.interceptionTypeNull(); } org.jboss.weld.interceptor.spi.model.InterceptionType internalInterceptionType = org.jboss.weld.interceptor.spi.model.InterceptionType.valueOf(interceptionType.name()); if (!internalInterceptionType.isLifecycleCallback()) { throw BeanLogger.LOG.interceptionTypeNotLifecycle(interceptionType.name()); } if (internalInterceptionType.equals(org.jboss.weld.interceptor.spi.model.InterceptionType.AROUND_CONSTRUCT)) { return extractCdiInterceptors(interceptionModel.getConstructorInvocationInterceptors()); } return extractCdiInterceptors(interceptionModel.getInterceptors(internalInterceptionType, null)); }
@Override public List<Interceptor<?>> getMethodInterceptors(InterceptionType interceptionType, Method method) { if (interceptionType == null) { throw BeanLogger.LOG.interceptionTypeNull(); } if (method == null) { throw BeanLogger.LOG.methodNull(); } org.jboss.weld.interceptor.spi.model.InterceptionType internalInterceptionType = org.jboss.weld.interceptor.spi.model.InterceptionType.valueOf(interceptionType.name()); if (internalInterceptionType.isLifecycleCallback()) { throw BeanLogger.LOG.interceptionTypeLifecycle(interceptionType.name()); } return extractCdiInterceptors(interceptionModel.getInterceptors(internalInterceptionType, method)); }
@Override public Collection<Interceptor<?>> getAllInterceptors() { Set<? extends InterceptorClassMetadata<?>> interceptorMetadataSet = interceptionModel.getAllInterceptors(); return extractCdiInterceptors(interceptorMetadataSet); }
@Override public List<Interceptor<?>> getLifecycleInterceptors(InterceptionType interceptionType) { if (interceptionType == null) { throw BeanLogger.LOG.interceptionTypeNull(); } org.jboss.weld.interceptor.spi.model.InterceptionType internalInterceptionType = org.jboss.weld.interceptor.spi.model.InterceptionType.valueOf(interceptionType.name()); if (!internalInterceptionType.isLifecycleCallback()) { throw BeanLogger.LOG.interceptionTypeNotLifecycle(interceptionType.name()); } if (internalInterceptionType.equals(org.jboss.weld.interceptor.spi.model.InterceptionType.AROUND_CONSTRUCT)) { return extractCdiInterceptors(interceptionModel.getConstructorInvocationInterceptors()); } return extractCdiInterceptors(interceptionModel.getInterceptors(internalInterceptionType, null)); }
@Override public List<Interceptor<?>> getMethodInterceptors(InterceptionType interceptionType, Method method) { if (interceptionType == null) { throw BeanLogger.LOG.interceptionTypeNull(); } if (method == null) { throw BeanLogger.LOG.methodNull(); } org.jboss.weld.interceptor.spi.model.InterceptionType internalInterceptionType = org.jboss.weld.interceptor.spi.model.InterceptionType.valueOf(interceptionType.name()); if (internalInterceptionType.isLifecycleCallback()) { throw BeanLogger.LOG.interceptionTypeLifecycle(interceptionType.name()); } return extractCdiInterceptors(interceptionModel.getInterceptors(internalInterceptionType, method)); }
@Override public Collection<Interceptor<?>> getAllInterceptors() { Set<? extends InterceptorClassMetadata<?>> interceptorMetadataSet = interceptionModel.getAllInterceptors(); return extractCdiInterceptors(interceptorMetadataSet); }
protected void registerInterceptors() { InterceptionModel model = beanManager.getInterceptorModelRegistry().get(getAnnotated()); if (model != null) { getBeanManager().getServices().get(EjbServices.class).registerInterceptors(getEjbDescriptor().delegate(), new InterceptorBindingsAdapter(model)); } } }
@Override public List<Interceptor<?>> getLifecycleInterceptors(InterceptionType interceptionType) { if (interceptionType == null) { throw BeanLogger.LOG.interceptionTypeNull(); } org.jboss.weld.interceptor.spi.model.InterceptionType internalInterceptionType = org.jboss.weld.interceptor.spi.model.InterceptionType.valueOf(interceptionType.name()); if (!internalInterceptionType.isLifecycleCallback()) { throw BeanLogger.LOG.interceptionTypeNotLifecycle(interceptionType.name()); } if (internalInterceptionType.equals(org.jboss.weld.interceptor.spi.model.InterceptionType.AROUND_CONSTRUCT)) { return extractCdiInterceptors(interceptionModel.getConstructorInvocationInterceptors()); } return extractCdiInterceptors(interceptionModel.getInterceptors(internalInterceptionType, null)); }
@Override public List<Interceptor<?>> getMethodInterceptors(InterceptionType interceptionType, Method method) { if (interceptionType == null) { throw BeanLogger.LOG.interceptionTypeNull(); } if (method == null) { throw BeanLogger.LOG.methodNull(); } org.jboss.weld.interceptor.spi.model.InterceptionType internalInterceptionType = org.jboss.weld.interceptor.spi.model.InterceptionType.valueOf(interceptionType.name()); if (internalInterceptionType.isLifecycleCallback()) { throw BeanLogger.LOG.interceptionTypeLifecycle(interceptionType.name()); } return extractCdiInterceptors(interceptionModel.getInterceptors(internalInterceptionType, method)); }
@Override public Collection<Interceptor<?>> getAllInterceptors() { Set<? extends InterceptorClassMetadata<?>> interceptorMetadataSet = interceptionModel.getAllInterceptors(); return extractCdiInterceptors(interceptorMetadataSet); }
protected void registerInterceptors() { InterceptionModel model = beanManager.getInterceptorModelRegistry().get(getAnnotated()); if (model != null) { getBeanManager().getServices().get(EjbServices.class).registerInterceptors(getEjbDescriptor().delegate(), new InterceptorBindingsAdapter(model)); } } }
@Override public List<Interceptor<?>> getLifecycleInterceptors(InterceptionType interceptionType) { if (interceptionType == null) { throw BeanLogger.LOG.interceptionTypeNull(); } org.jboss.weld.interceptor.spi.model.InterceptionType internalInterceptionType = org.jboss.weld.interceptor.spi.model.InterceptionType.valueOf(interceptionType.name()); if (!internalInterceptionType.isLifecycleCallback()) { throw BeanLogger.LOG.interceptionTypeNotLifecycle(interceptionType.name()); } if (internalInterceptionType.equals(org.jboss.weld.interceptor.spi.model.InterceptionType.AROUND_CONSTRUCT)) { return extractCdiInterceptors(interceptionModel.getConstructorInvocationInterceptors()); } return extractCdiInterceptors(interceptionModel.getInterceptors(internalInterceptionType, null)); }
@Override public List<Interceptor<?>> getMethodInterceptors(InterceptionType interceptionType, Method method) { if (interceptionType == null) { throw BeanLogger.LOG.interceptionTypeNull(); } if (method == null) { throw BeanLogger.LOG.methodNull(); } org.jboss.weld.interceptor.spi.model.InterceptionType internalInterceptionType = org.jboss.weld.interceptor.spi.model.InterceptionType.valueOf(interceptionType.name()); if (internalInterceptionType.isLifecycleCallback()) { throw BeanLogger.LOG.interceptionTypeLifecycle(interceptionType.name()); } return extractCdiInterceptors(interceptionModel.getInterceptors(internalInterceptionType, method)); }
@Override public Collection<Interceptor<?>> getAllInterceptors() { Set<? extends InterceptorClassMetadata<?>> interceptorMetadataSet = interceptionModel.getAllInterceptors(); return extractCdiInterceptors(interceptorMetadataSet); }
public void registerCdiInterceptorsForMessageDrivenBeans(BeanDeployerEnvironment environment, BeanManagerImpl manager) { for (InternalEjbDescriptor<?> descriptor : getEjbDescriptors()) { if (descriptor.isMessageDriven()) { EnhancedAnnotatedType<?> type = manager.getServices().getRequired(ClassTransformer.class).getEnhancedAnnotatedType(descriptor.getBeanClass(), manager.getId()); if (!manager.getInterceptorModelRegistry().containsKey(type.slim())) { InterceptionModelInitializer.of(manager, type, null).init(); } InterceptionModel model = manager.getInterceptorModelRegistry().get(type.slim()); if (model != null) { ejbServices.registerInterceptors(descriptor.delegate(), new InterceptorBindingsAdapter(model)); } } } }
@Override public List<Interceptor<?>> getLifecycleInterceptors(InterceptionType interceptionType) { if (interceptionType == null) { throw BeanLogger.LOG.interceptionTypeNull(); } org.jboss.weld.interceptor.spi.model.InterceptionType internalInterceptionType = org.jboss.weld.interceptor.spi.model.InterceptionType.valueOf(interceptionType.name()); if (!internalInterceptionType.isLifecycleCallback()) { throw BeanLogger.LOG.interceptionTypeNotLifecycle(interceptionType.name()); } if (internalInterceptionType.equals(org.jboss.weld.interceptor.spi.model.InterceptionType.AROUND_CONSTRUCT)) { return extractCdiInterceptors(interceptionModel.getConstructorInvocationInterceptors()); } return extractCdiInterceptors(interceptionModel.getInterceptors(internalInterceptionType, null)); }