javax.enterprise.inject.spi.ProcessProducer Java Examples
The following examples show how to use
javax.enterprise.inject.spi.ProcessProducer.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AxonCdiExtension.java From cdi with Apache License 2.0 | 5 votes |
<T> void processSnapshotTriggerDefinitionProducer( @Observes final ProcessProducer<T, SnapshotTriggerDefinition> processProducer) { logger.debug("Found producer for snapshot trigger definition: {}.", processProducer.getProducer()); String triggerDefinitionName = CdiUtilities.extractBeanName(processProducer.getAnnotatedMember()); this.snapshotTriggerDefinitionProducerMap.put(triggerDefinitionName, processProducer.getProducer()); }
Example #2
Source File: AxonCdiExtension.java From cdi with Apache License 2.0 | 5 votes |
<T> void processSagaStoreProducer( @Observes final ProcessProducer<T, SagaStore> processProducer) { logger.debug("Producer for saga store found: {}.", processProducer.getProducer()); String sagaStoreName = CdiUtilities.extractBeanName(processProducer.getAnnotatedMember()); this.sagaStoreProducerMap.put(sagaStoreName, processProducer.getProducer()); }
Example #3
Source File: AxonCdiExtension.java From cdi with Apache License 2.0 | 5 votes |
<T> void processEventProcessingConfigurationProducer( @Observes final ProcessProducer<T, EventProcessingConfiguration> processProducer) { // TODO Handle multiple producer definitions. logger.debug("Producer for event processing configuration found: {}.", processProducer.getProducer()); this.eventProcessingConfigurationProducer = processProducer.getProducer(); }
Example #4
Source File: AxonCdiExtension.java From cdi with Apache License 2.0 | 5 votes |
<T> void processEventHandlingConfigurationProducer( @Observes final ProcessProducer<T, EventHandlingConfiguration> processProducer) { // TODO Handle multiple producer definitions. logger.debug("Producer for event handling configuration found: {}.", processProducer.getProducer()); this.eventHandlingConfigurationProducer = processProducer.getProducer(); }
Example #5
Source File: AxonCdiExtension.java From cdi with Apache License 2.0 | 5 votes |
<T> void processModuleConfigurationProducer( @Observes final ProcessProducer<T, ModuleConfiguration> processProducer) { logger.debug("Producer for module configuration found: {}.", processProducer.getProducer()); this.moduleConfigurationProducers.add(processProducer.getProducer()); }
Example #6
Source File: AxonCdiExtension.java From cdi with Apache License 2.0 | 5 votes |
<T> void processDeadlineManagerProducer( @Observes final ProcessProducer<T, DeadlineManager> processProducer) { // TODO Handle multiple producer definitions. logger.debug("Producer for deadline manager found: {}.", processProducer.getProducer()); this.deadlineManagerProducer = processProducer.getProducer(); }
Example #7
Source File: AxonCdiExtension.java From cdi with Apache License 2.0 | 5 votes |
<T> void processQueryUpdateEmitterProducer( @Observes final ProcessProducer<T, QueryUpdateEmitter> processProducer) { // TODO Handle multiple producer definitions. logger.debug("Producer for query update emitter found: {}.", processProducer.getProducer()); this.queryUpdateEmitterProducer = processProducer.getProducer(); }
Example #8
Source File: AxonCdiExtension.java From cdi with Apache License 2.0 | 5 votes |
<T> void processQueryGatewayProducer( @Observes final ProcessProducer<T, QueryGateway> processProducer) { // TODO Handle multiple producer definitions. logger.debug("Producer for query gateway found: {}.", processProducer.getProducer()); this.queryGatewayProducer = processProducer.getProducer(); }
Example #9
Source File: AxonCdiExtension.java From cdi with Apache License 2.0 | 5 votes |
<T> void processQueryBusProducer( @Observes final ProcessProducer<T, QueryBus> processProducer) { // TODO Handle multiple producer definitions. logger.debug("Producer for query bus found: {}.", processProducer.getProducer()); this.queryBusProducer = processProducer.getProducer(); }
Example #10
Source File: AxonCdiExtension.java From cdi with Apache License 2.0 | 5 votes |
<T> void processCorrelationDataProviderProducer( @Observes final ProcessProducer<T, CorrelationDataProvider> processProducer) { logger.debug("Producer for correlation data provider found: {}.", processProducer.getProducer()); this.correlationDataProviderProducers.add(processProducer.getProducer()); }
Example #11
Source File: AxonCdiExtension.java From cdi with Apache License 2.0 | 5 votes |
<T> void processListenerInvocationErrorHandlerProducer( @Observes final ProcessProducer<T, ListenerInvocationErrorHandler> processProducer) { // TODO Handle multiple producer definitions. logger.debug("Producer for listener invocation error handler found: {}.", processProducer.getProducer()); this.listenerInvocationErrorHandlerProducer = processProducer.getProducer(); }
Example #12
Source File: AxonCdiExtension.java From cdi with Apache License 2.0 | 5 votes |
<T> void processErrorHandlerProducer( @Observes final ProcessProducer<T, ErrorHandler> processProducer) { // TODO Handle multiple producer definitions. logger.debug("Producer for error handler found: {}.", processProducer.getProducer()); this.errorHandlerProducer = processProducer.getProducer(); }
Example #13
Source File: AxonCdiExtension.java From cdi with Apache License 2.0 | 5 votes |
/** * Scans for an entity manager provider producer. * * @param processProducer process producer event. */ <T> void processEntityManagerProviderProducer( @Observes final ProcessProducer<T, EntityManagerProvider> processProducer) { // TODO Investigate if there is a way to look up the entity manager // from the environment. There likely isn't. // TODO Handle multiple producer definitions. logger.debug("Producer for entity manager provider found: {}.", processProducer.getProducer()); this.entityManagerProviderProducer = processProducer.getProducer(); }
Example #14
Source File: AxonCdiExtension.java From cdi with Apache License 2.0 | 5 votes |
<T> void processAggregateRepositoryProducer( @Observes final ProcessProducer<T, Repository> processProducer) { logger.debug("Found producer for repository: {}.", processProducer.getProducer()); String repositoryName = CdiUtilities.extractBeanName(processProducer.getAnnotatedMember()); this.aggregateRepositoryProducerMap.put(repositoryName, processProducer.getProducer()); }
Example #15
Source File: AxonCdiExtension.java From cdi with Apache License 2.0 | 5 votes |
<T> void processCommandTargetResolverProducer( @Observes final ProcessProducer<T, CommandTargetResolver> processProducer) { logger.debug("Found producer for command target resolver: {}.", processProducer.getProducer()); String resolverName = CdiUtilities.extractBeanName(processProducer.getAnnotatedMember()); this.commandTargetResolverProducerMap.put(resolverName, processProducer.getProducer()); }
Example #16
Source File: AxonCdiExtension.java From cdi with Apache License 2.0 | 5 votes |
/** * Scans for an event storage engine producer. * * @param processProducer process producer event. */ // Mark: I know these seem especially frivolous and looks like they may be // replaced with post deployment look-ups or injection of some kind. // Unfortunately I don't think it is that straightforwards for reasons // explained a bit later. That said, I do want to discuss these with you. <T> void processEventStorageEngineProducer( @Observes final ProcessProducer<T, EventStorageEngine> processProducer) { // TODO Handle multiple producer definitions. logger.debug("Producer for event storage engine found: {}.", processProducer.getProducer()); this.eventStorageEngineProducer = processProducer.getProducer(); }
Example #17
Source File: AxonCdiExtension.java From cdi with Apache License 2.0 | 5 votes |
<T> void processSagaConfigurationProducer( @Observes final ProcessProducer<T, SagaConfiguration<?>> processProducer) { logger.debug("Producer for saga configuration found: {}.", processProducer.getProducer()); String sagaConfigurationName = CdiUtilities.extractBeanName(processProducer.getAnnotatedMember()); sagaConfigurationProducerMap.put(sagaConfigurationName, processProducer.getProducer()); }
Example #18
Source File: AxonCdiExtension.java From cdi with Apache License 2.0 | 5 votes |
/** * Scans for a configurer producer. * * @param processProducer process producer event. */ <T> void processConfigurerProducer( @Observes final ProcessProducer<T, Configurer> processProducer) { // TODO Handle multiple producer definitions. logger.debug("Producer for configurer found: {}.", processProducer.getProducer()); this.configurerProducer = processProducer.getProducer(); }
Example #19
Source File: AxonCdiExtension.java From cdi with Apache License 2.0 | 5 votes |
/** * Scans for a transaction manager producer. * * @param processProducer process producer event. */ <T> void processTransactionManagerProducer( @Observes final ProcessProducer<T, TransactionManager> processProducer) { // TODO Handle multiple producer definitions. logger.debug("Producer for transaction manager found: {}.", processProducer.getProducer()); this.transactionManagerProducer = processProducer.getProducer(); }
Example #20
Source File: AxonCdiExtension.java From cdi with Apache License 2.0 | 5 votes |
/** * Scans for a serializer producer. * * @param processProducer process producer event. */ <T> void processSerializerProducer( @Observes final ProcessProducer<T, Serializer> processProducer) { // TODO Handle multiple serializer definitions of the same type. AnnotatedMember<T> annotatedMember = processProducer.getAnnotatedMember(); Named named = annotatedMember.getAnnotation(Named.class); if (named != null) { String namedValue = named.value(); String serializerName = "".equals(namedValue) ? annotatedMember.getJavaMember().getName() : namedValue; switch (serializerName) { case "eventSerializer": logger.debug("Producer for event serializer found: {}.", processProducer.getProducer()); eventSerializerProducer = processProducer.getProducer(); break; case "messageSerializer": logger.debug("Producer for message serializer found: {}.", processProducer.getProducer()); messageSerializerProducer = processProducer.getProducer(); break; case "serializer": logger.debug("Producer for serializer found: {}.", processProducer.getProducer()); this.serializerProducer = processProducer.getProducer(); break; default: logger.warn("Unknown named serializer configured: " + serializerName); } } else { logger.debug("Producer for serializer found: {}.", processProducer.getProducer()); this.serializerProducer = processProducer.getProducer(); } }
Example #21
Source File: AxonCdiExtension.java From cdi with Apache License 2.0 | 5 votes |
/** * Scans for an event bus producer. * * @param processProducer process producer event. */ <T> void processEventBusProducer( @Observes final ProcessProducer<T, EventBus> processProducer) { // TODO Handle multiple producer definitions. logger.debug("Producer for event bus found: {}.", processProducer.getProducer()); this.eventBusProducer = processProducer.getProducer(); }
Example #22
Source File: AxonCdiExtension.java From cdi with Apache License 2.0 | 5 votes |
/** * Scans for a command bus producer. * * @param processProducer process producer event. */ <T> void processCommandBusProducer( @Observes final ProcessProducer<T, CommandBus> processProducer) { // TODO Handle multiple producer definitions. logger.debug("Producer for command bus found: {}.", processProducer.getProducer()); this.commandBusProducer = processProducer.getProducer(); }
Example #23
Source File: AxonCdiExtension.java From cdi with Apache License 2.0 | 5 votes |
/** * Scans for a token store producer. * * @param processProducer process producer event. */ <T> void processTokenStoreProducer( @Observes final ProcessProducer<T, TokenStore> processProducer) { // TODO Handle multiple producer definitions. logger.debug("Producer for token store found: {}.", processProducer.getProducer()); this.tokenStoreProducer = processProducer.getProducer(); }
Example #24
Source File: AxonCdiExtension.java From cdi with Apache License 2.0 | 4 votes |
<T> void processConfigurerModuleProducer( @Observes final ProcessProducer<T, ConfigurerModule> processProducer) { logger.debug("Producer for configurer module found: {}.", processProducer.getProducer()); this.configurerModuleProducers.add(processProducer.getProducer()); }
Example #25
Source File: AxonCdiExtension.java From cdi with Apache License 2.0 | 4 votes |
<T> void processEventUpcasterProducer( @Observes final ProcessProducer<T, EventUpcaster> processProducer) { logger.debug("Producer for event upcaster found: {}.", processProducer.getProducer()); this.eventUpcasterProducers.add(processProducer.getProducer()); }
Example #26
Source File: MPConfigExtension.java From microprofile-jwt-auth with Apache License 2.0 | 4 votes |
void doProcessProducers(@Observes ProcessProducer pp) { System.out.printf("pp: %s, %s\n", pp.getAnnotatedMember(), pp.getProducer()); }
Example #27
Source File: JpaUnitCdiExtension.java From jpa-unit with Apache License 2.0 | 4 votes |
public <T> void registerProducer(@Observes final ProcessProducer<T, EntityManager> pb) { pb.setProducer(new EntityManagerProducerProxy(pb.getProducer())); }
Example #28
Source File: AbstractNetworkExtension.java From thorntail with Apache License 2.0 | 4 votes |
@SuppressWarnings("unused") void process(@Observes ProcessProducer<?, T> p, BeanManager beanManager) throws Exception { p.setProducer(producer(p.getProducer())); }
Example #29
Source File: MockExtension.java From deltaspike with Apache License 2.0 | 4 votes |
public <X, T> void onProcessProducer(@Observes ProcessProducer<X, T> processProducer, BeanManager beanManager) { if (!isActivated) { return; } for (MockFilter mockFilter : mockFilters) { if (!mockFilter.isMockedImplementationSupported(beanManager, processProducer.getAnnotatedMember())) { return; } } final Producer<T> originalProducer = processProducer.getProducer(); AnnotatedMember<X> annotatedMember = processProducer.getAnnotatedMember(); List<Annotation> qualifiers = new ArrayList<Annotation>(); for (Annotation annotation : annotatedMember.getAnnotations()) { if (beanManager.isQualifier(annotation.annotationType())) { qualifiers.add(annotation); } } Typed typed = annotatedMember.getAnnotation(Typed.class); List<Type> foundTypes = new ArrayList<Type>(); if (typed != null) { Collections.addAll(foundTypes, typed.value()); } else if (annotatedMember.getBaseType() instanceof Class) { foundTypes.addAll(extractTypes((Class)annotatedMember.getBaseType())); } if (foundTypes.isEmpty()) { return; } processProducer.setProducer(new MockAwareProducerWrapper<T>( beanManager, originalProducer, foundTypes, qualifiers)); }