HandlerImpl(Supplier<T> supplier, WeldInstance<T> instance, Bean<?> bean) { this.value = LazyValueHolder.forSupplier(supplier); this.bean = bean; this.instance = new WeakReference<>(instance); this.isDestroyed = new AtomicBoolean(false); }
HandlerImpl(Supplier<T> supplier, WeldInstance<T> instance, Bean<?> bean) { this.value = LazyValueHolder.forSupplier(supplier); this.bean = bean; this.instance = new WeakReference<>(instance); this.isDestroyed = new AtomicBoolean(false); }
HandlerImpl(Supplier<T> supplier, WeldInstance<T> instance, Bean<?> bean) { this.value = LazyValueHolder.forSupplier(supplier); this.bean = bean; this.instance = new WeakReference<>(instance); this.isDestroyed = new AtomicBoolean(false); }
HandlerImpl(Supplier<T> supplier, WeldInstance<T> instance, Bean<?> bean) { this.value = LazyValueHolder.forSupplier(supplier); this.bean = bean; this.instance = new WeakReference<>(instance); this.isDestroyed = new AtomicBoolean(false); }
HandlerImpl(Supplier<T> supplier, WeldInstance<T> instance, Bean<?> bean) { this.value = LazyValueHolder.forSupplier(supplier); this.bean = bean; this.instance = new WeakReference<>(instance); this.isDestroyed = new AtomicBoolean(false); }
HandlerImpl(Supplier<T> supplier, WeldInstance<T> instance, Bean<?> bean) { this.value = LazyValueHolder.forSupplier(supplier); this.bean = bean; this.instance = new WeakReference<>(instance); this.isDestroyed = new AtomicBoolean(false); }
public WeldELResolver(BeanManagerImpl manager) { this.beanManager = manager; this.rootNamespace = LazyValueHolder.forSupplier(() -> new Namespace(manager.getDynamicAccessibleNamespaces())); }
public WeldELResolver(BeanManagerImpl manager) { this.beanManager = manager; this.rootNamespace = LazyValueHolder.forSupplier(() -> new Namespace(manager.getDynamicAccessibleNamespaces())); }
public WeldELResolver(BeanManagerImpl manager) { this.beanManager = manager; this.rootNamespace = LazyValueHolder.forSupplier(() -> new Namespace(manager.getDynamicAccessibleNamespaces())); }
protected ObserverNotifier(String contextId, TypeSafeObserverResolver resolver, ServiceRegistry services, boolean strict) { this.resolver = resolver; this.sharedObjectCache = services.get(SharedObjectCache.class); this.strict = strict; this.currentEventMetadata = services.get(CurrentEventMetadata.class); if (strict) { this.eventTypeCheckCache = ComputingCacheBuilder.newBuilder().build(new EventTypeCheck()); } else { // not necessary this.eventTypeCheckCache = null; } // fall back to FJP.commonPool() if ExecutorServices are not installed this.asyncEventExecutor = services.getOptional(ExecutorServices.class).map((e) -> e.getTaskExecutor()).orElse(ForkJoinPool.commonPool()); // ScheduledExecutor might have null value this.timerExecutor = services.getOptional(ExecutorServices.class).map((e) -> e.getTimerExecutor()).orElse(null); this.securityServices = services.getRequired(SecurityServices.class); // LazyValueHolder is used because contexts are not ready yet at the point when ObserverNotifier is first initialized this.requestContextHolder = LazyValueHolder .forSupplier(() -> Container.instance(contextId).deploymentManager().instance().select(RequestContext.class, UnboundLiteral.INSTANCE).get()); }
protected ObserverNotifier(String contextId, TypeSafeObserverResolver resolver, ServiceRegistry services, boolean strict) { this.resolver = resolver; this.sharedObjectCache = services.get(SharedObjectCache.class); this.strict = strict; this.currentEventMetadata = services.get(CurrentEventMetadata.class); if (strict) { this.eventTypeCheckCache = ComputingCacheBuilder.newBuilder().build(new EventTypeCheck()); } else { // not necessary this.eventTypeCheckCache = null; } // fall back to FJP.commonPool() if ExecutorServices are not installed this.asyncEventExecutor = services.getOptional(ExecutorServices.class).map((e) -> e.getTaskExecutor()).orElse(ForkJoinPool.commonPool()); // ScheduledExecutor might have null value this.timerExecutor = services.getOptional(ExecutorServices.class).map((e) -> e.getTimerExecutor()).orElse(null); this.securityServices = services.getRequired(SecurityServices.class); // LazyValueHolder is used because contexts are not ready yet at the point when ObserverNotifier is first initialized this.requestContextHolder = LazyValueHolder .forSupplier(() -> Container.instance(contextId).deploymentManager().instance().select(RequestContext.class, UnboundLiteral.INSTANCE).get()); }
protected ObserverNotifier(String contextId, TypeSafeObserverResolver resolver, ServiceRegistry services, boolean strict) { this.resolver = resolver; this.sharedObjectCache = services.get(SharedObjectCache.class); this.strict = strict; this.currentEventMetadata = services.get(CurrentEventMetadata.class); if (strict) { this.eventTypeCheckCache = ComputingCacheBuilder.newBuilder().build(new EventTypeCheck()); } else { // not necessary this.eventTypeCheckCache = null; } // fall back to FJP.commonPool() if ExecutorServices are not installed this.asyncEventExecutor = services.getOptional(ExecutorServices.class).map((e) -> e.getTaskExecutor()).orElse(ForkJoinPool.commonPool()); // ScheduledExecutor might have null value this.timerExecutor = services.getOptional(ExecutorServices.class).map((e) -> e.getTimerExecutor()).orElse(null); this.securityServices = services.getRequired(SecurityServices.class); // LazyValueHolder is used because contexts are not ready yet at the point when ObserverNotifier is first initialized this.requestContextHolder = LazyValueHolder .forSupplier(() -> Container.instance(contextId).deploymentManager().instance().select(RequestContext.class, UnboundLiteral.INSTANCE).get()); }
protected ObserverNotifier(String contextId, TypeSafeObserverResolver resolver, ServiceRegistry services, boolean strict) { this.resolver = resolver; this.sharedObjectCache = services.get(SharedObjectCache.class); this.strict = strict; this.currentEventMetadata = services.get(CurrentEventMetadata.class); if (strict) { this.eventTypeCheckCache = ComputingCacheBuilder.newBuilder().build(new EventTypeCheck()); } else { // not necessary this.eventTypeCheckCache = null; } // fall back to FJP.commonPool() if ExecutorServices are not installed this.asyncEventExecutor = services.getOptional(ExecutorServices.class).map((e) -> e.getTaskExecutor()).orElse(ForkJoinPool.commonPool()); // ScheduledExecutor might have null value this.timerExecutor = services.getOptional(ExecutorServices.class).map((e) -> e.getTimerExecutor()).orElse(null); this.securityServices = services.getRequired(SecurityServices.class); // LazyValueHolder is used because contexts are not ready yet at the point when ObserverNotifier is first initialized this.requestContextHolder = LazyValueHolder .forSupplier(() -> Container.instance(contextId).deploymentManager().instance().select(RequestContext.class, UnboundLiteral.INSTANCE).get()); }
protected ObserverNotifier(String contextId, TypeSafeObserverResolver resolver, ServiceRegistry services, boolean strict) { this.resolver = resolver; this.sharedObjectCache = services.get(SharedObjectCache.class); this.strict = strict; this.currentEventMetadata = services.get(CurrentEventMetadata.class); if (strict) { this.eventTypeCheckCache = ComputingCacheBuilder.newBuilder().build(new EventTypeCheck()); } else { // not necessary this.eventTypeCheckCache = null; } // fall back to FJP.commonPool() if ExecutorServices are not installed this.asyncEventExecutor = services.getOptional(ExecutorServices.class).map((e) -> e.getTaskExecutor()).orElse(ForkJoinPool.commonPool()); // ScheduledExecutor might have null value this.timerExecutor = services.getOptional(ExecutorServices.class).map((e) -> e.getTimerExecutor()).orElse(null); this.securityServices = services.getRequired(SecurityServices.class); // LazyValueHolder is used because contexts are not ready yet at the point when ObserverNotifier is first initialized this.requestContextHolder = LazyValueHolder .forSupplier(() -> Container.instance(contextId).deploymentManager().instance().select(RequestContext.class, UnboundLiteral.INSTANCE).get()); }
this.currentInjectionPoint = getServices().get(CurrentInjectionPoint.class); this.clientProxyOptimization = getServices().get(WeldConfiguration.class).getBooleanProperty(ConfigurationKey.INJECTABLE_REFERENCE_OPTIMIZATION); this.requestInitializedEvent = LazyValueHolder.forSupplier(() -> FastEvent.of(Object.class, this, Initialized.Literal.REQUEST)); this.requestBeforeDestroyedEvent = LazyValueHolder.forSupplier(() -> FastEvent.of(Object.class, this, BeforeDestroyed.Literal.REQUEST)); this.requestDestroyedEvent = LazyValueHolder.forSupplier(() -> FastEvent.of(Object.class, this, Destroyed.Literal.REQUEST));
this.currentInjectionPoint = getServices().get(CurrentInjectionPoint.class); this.clientProxyOptimization = getServices().get(WeldConfiguration.class).getBooleanProperty(ConfigurationKey.INJECTABLE_REFERENCE_OPTIMIZATION); this.requestInitializedEvent = LazyValueHolder.forSupplier(() -> FastEvent.of(Object.class, this, Initialized.Literal.REQUEST)); this.requestBeforeDestroyedEvent = LazyValueHolder.forSupplier(() -> FastEvent.of(Object.class, this, BeforeDestroyed.Literal.REQUEST)); this.requestDestroyedEvent = LazyValueHolder.forSupplier(() -> FastEvent.of(Object.class, this, Destroyed.Literal.REQUEST));
this.currentInjectionPoint = getServices().get(CurrentInjectionPoint.class); this.clientProxyOptimization = getServices().get(WeldConfiguration.class).getBooleanProperty(ConfigurationKey.INJECTABLE_REFERENCE_OPTIMIZATION); this.requestInitializedEvent = LazyValueHolder.forSupplier(() -> FastEvent.of(Object.class, this, Initialized.Literal.REQUEST)); this.requestBeforeDestroyedEvent = LazyValueHolder.forSupplier(() -> FastEvent.of(Object.class, this, BeforeDestroyed.Literal.REQUEST)); this.requestDestroyedEvent = LazyValueHolder.forSupplier(() -> FastEvent.of(Object.class, this, Destroyed.Literal.REQUEST));
this.currentInjectionPoint = getServices().get(CurrentInjectionPoint.class); this.clientProxyOptimization = getServices().get(WeldConfiguration.class).getBooleanProperty(ConfigurationKey.INJECTABLE_REFERENCE_OPTIMIZATION); this.requestInitializedEvent = LazyValueHolder.forSupplier(() -> FastEvent.of(Object.class, this, Initialized.Literal.REQUEST)); this.requestBeforeDestroyedEvent = LazyValueHolder.forSupplier(() -> FastEvent.of(Object.class, this, BeforeDestroyed.Literal.REQUEST)); this.requestDestroyedEvent = LazyValueHolder.forSupplier(() -> FastEvent.of(Object.class, this, Destroyed.Literal.REQUEST));
this.currentInjectionPoint = getServices().get(CurrentInjectionPoint.class); this.clientProxyOptimization = getServices().get(WeldConfiguration.class).getBooleanProperty(ConfigurationKey.INJECTABLE_REFERENCE_OPTIMIZATION); this.requestInitializedEvent = LazyValueHolder.forSupplier(() -> FastEvent.of(Object.class, this, Initialized.Literal.REQUEST)); this.requestBeforeDestroyedEvent = LazyValueHolder.forSupplier(() -> FastEvent.of(Object.class, this, BeforeDestroyed.Literal.REQUEST)); this.requestDestroyedEvent = LazyValueHolder.forSupplier(() -> FastEvent.of(Object.class, this, Destroyed.Literal.REQUEST));