javax.enterprise.inject.spi.ProcessProducerMethod Java Examples

The following examples show how to use javax.enterprise.inject.spi.ProcessProducerMethod. 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 Project: smallrye-metrics   Author: smallrye   File: MetricCdiInjectionExtension.java    License: Apache License 2.0 4 votes vote down vote up
private void findMetricProducerMethods(@Observes ProcessProducerMethod<? extends Metric, ?> ppm) {
    if (!ppm.getBean().getBeanClass().equals(MetricProducer.class)) {
        SmallRyeMetricsLogging.log.producerMethodDiscovered(ppm.getAnnotatedProducerMethod());
        metricsFromProducers.put(ppm.getBean(), ppm.getAnnotatedProducerMethod());
    }
}
 
Example #2
Source Project: cxf   Author: apache   File: JAXRSCdiResourceExtension.java    License: Apache License 2.0 4 votes vote down vote up
public <T, X> void collect(@Observes final ProcessProducerMethod< T, X > event) {
    final Type baseType = event.getAnnotatedProducerMethod().getBaseType();
    processProducer(event, baseType);
}
 
Example #3
Source Project: metrics-cdi   Author: astefanutti   File: HealthCheckExtension.java    License: Apache License 2.0 4 votes vote down vote up
private void healthCheckProducerMethod(@Observes ProcessProducerMethod<? extends HealthCheck, ?> ppm) {
    healthChecks.put(ppm.getBean(), ppm.getAnnotatedProducerMethod());
}
 
Example #4
Source Project: metrics-cdi   Author: astefanutti   File: MetricsExtension.java    License: Apache License 2.0 4 votes vote down vote up
private void metricProducerMethod(@Observes ProcessProducerMethod<? extends Metric, ?> ppm) {
    // Skip the Metrics CDI alternatives
    if (!ppm.getBean().getBeanClass().equals(MetricProducer.class))
        metrics.put(ppm.getBean(), ppm.getAnnotatedProducerMethod());
}
 
Example #5
Source Project: deltaspike   Author: apache   File: ConfigurationExtension.java    License: Apache License 2.0 4 votes vote down vote up
public void findDynamicProducer(@Observes ProcessProducerMethod<?, DynamicBeanProducer> processBean)
{
    dynamicProducer = processBean.getBean();
}