@Override public <S extends Service> Optional<S> getOptional(Class<S> type) { return delegate().getOptional(type); }
@Override public <S extends Service> Optional<S> getOptional(Class<S> type) { return delegate().getOptional(type); }
@Override public <S extends Service> Optional<S> getOptional(Class<S> type) { return delegate().getOptional(type); }
@Override public <S extends Service> Optional<S> getOptional(Class<S> type) { return delegate().getOptional(type); }
@Override public <S extends Service> Optional<S> getOptional(Class<S> type) { return delegate().getOptional(type); }
@Override public <S extends Service> Optional<S> getOptional(Class<S> type) { return delegate().getOptional(type); }
@Override public ExpressionFactory wrapExpressionFactory(ExpressionFactory expressionFactory) { return services.getOptional(ExpressionLanguageSupport.class) .orElseThrow(() -> BootstrapLogger.LOG.unspecifiedRequiredService(ExpressionLanguageSupport.class, id)) .wrapExpressionFactory(expressionFactory); }
@Override public ExpressionFactory wrapExpressionFactory(ExpressionFactory expressionFactory) { return services.getOptional(ExpressionLanguageSupport.class) .orElseThrow(() -> BootstrapLogger.LOG.unspecifiedRequiredService(ExpressionLanguageSupport.class, id)) .wrapExpressionFactory(expressionFactory); }
@Override public ExpressionFactory wrapExpressionFactory(ExpressionFactory expressionFactory) { return services.getOptional(ExpressionLanguageSupport.class) .orElseThrow(() -> BootstrapLogger.LOG.unspecifiedRequiredService(ExpressionLanguageSupport.class, id)) .wrapExpressionFactory(expressionFactory); }
@Override public ExpressionFactory wrapExpressionFactory(ExpressionFactory expressionFactory) { return services.getOptional(ExpressionLanguageSupport.class) .orElseThrow(() -> BootstrapLogger.LOG.unspecifiedRequiredService(ExpressionLanguageSupport.class, id)) .wrapExpressionFactory(expressionFactory); }
@Override public ExpressionFactory wrapExpressionFactory(ExpressionFactory expressionFactory) { return services.getOptional(ExpressionLanguageSupport.class) .orElseThrow(() -> BootstrapLogger.LOG.unspecifiedRequiredService(ExpressionLanguageSupport.class, id)) .wrapExpressionFactory(expressionFactory); }
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.interceptorResolver = new TypeSafeInterceptorResolver(this, createDynamicGlobalIterable(BeanManagerImpl::getInterceptors)); this.nameBasedResolver = new NameBasedResolver(this, createDynamicAccessibleIterable(beanTransform)); this.weldELResolver = services.getOptional(ExpressionLanguageSupport.class).map(el -> el.createElResolver(this)).orElse(null);
this.interceptorResolver = new TypeSafeInterceptorResolver(this, createDynamicGlobalIterable(BeanManagerImpl::getInterceptors)); this.nameBasedResolver = new NameBasedResolver(this, createDynamicAccessibleIterable(beanTransform)); this.weldELResolver = services.getOptional(ExpressionLanguageSupport.class).map(el -> el.createElResolver(this)).orElse(null);
this.interceptorResolver = new TypeSafeInterceptorResolver(this, createDynamicGlobalIterable(BeanManagerImpl::getInterceptors)); this.nameBasedResolver = new NameBasedResolver(this, createDynamicAccessibleIterable(beanTransform)); this.weldELResolver = services.getOptional(ExpressionLanguageSupport.class).map(el -> el.createElResolver(this)).orElse(null);
this.interceptorResolver = new TypeSafeInterceptorResolver(this, createDynamicGlobalIterable(BeanManagerImpl::getInterceptors)); this.nameBasedResolver = new NameBasedResolver(this, createDynamicAccessibleIterable(beanTransform)); this.weldELResolver = services.getOptional(ExpressionLanguageSupport.class).map(el -> el.createElResolver(this)).orElse(null);