use of javax.enterprise.inject.spi.ProcessBean in project camel by apache.
the class CdiCamelExtension method beans.
private void beans(@Observes ProcessBean<?> pb, BeanManager manager) {
cdiBeans.add(pb.getBean());
// Lookup for CDI event endpoint injection points
pb.getBean().getInjectionPoints().stream().filter(ip -> CdiEventEndpoint.class.equals(getRawType(ip.getType()))).forEach(ip -> {
Type type = ip.getType() instanceof ParameterizedType ? ((ParameterizedType) ip.getType()).getActualTypeArguments()[0] : Object.class;
String uri = eventEndpointUri(type, ip.getQualifiers());
cdiEventEndpoints.put(uri, new CdiEventEndpoint<>(uri, type, ip.getQualifiers(), manager));
});
}
Aggregations