use of io.quarkus.runtime.RuntimeValue in project camel-quarkus by apache.
the class CamelOpenTracingRecorder method createCamelOpenTracingTracer.
public RuntimeValue<OpenTracingTracer> createCamelOpenTracingTracer(CamelOpenTracingConfig camelOpenTracingConfig, BeanContainer beanContainer) {
Tracer tracer = beanContainer.instance(Tracer.class);
OpenTracingTracer openTracingTracer = new OpenTracingTracer();
if (tracer != null) {
openTracingTracer.setTracer(tracer);
openTracingTracer.setEncoding(camelOpenTracingConfig.encoding);
if (camelOpenTracingConfig.excludePatterns.isPresent()) {
openTracingTracer.setExcludePatterns(new LinkedHashSet<>(camelOpenTracingConfig.excludePatterns.get()));
}
}
return new RuntimeValue<>(openTracingTracer);
}
use of io.quarkus.runtime.RuntimeValue in project camel-quarkus by apache.
the class CamelJfrRecorder method createStartupStepRecorder.
public RuntimeValue<CamelContextCustomizer> createStartupStepRecorder(RuntimeCamelJfrConfig config) {
CamelContextCustomizer flightRecorderCustomizer = new CamelContextCustomizer() {
@Override
public void configure(CamelContext camelContext) {
FlightRecorderStartupStepRecorder flightRecorder = new FlightRecorderStartupStepRecorder();
if (config.startupRecorderRecording.isPresent()) {
flightRecorder.setRecording(config.startupRecorderRecording.get());
}
if (config.startupRecorderProfile.isPresent()) {
flightRecorder.setRecordingProfile(config.startupRecorderProfile.get());
}
if (config.startupRecorderMaxDepth.isPresent()) {
flightRecorder.setMaxDepth(config.startupRecorderMaxDepth.get());
}
if (config.startupRecorderDuration.isPresent()) {
flightRecorder.setStartupRecorderDuration(config.startupRecorderDuration.get());
}
if (config.startupRecorderDir.isPresent()) {
flightRecorder.setRecordingDir(config.startupRecorderDir.get());
}
camelContext.getExtension(ExtendedCamelContext.class).setStartupStepRecorder(flightRecorder);
flightRecorder.setEnabled(true);
flightRecorder.start();
}
};
return new RuntimeValue<>(flightRecorderCustomizer);
}
use of io.quarkus.runtime.RuntimeValue in project camel-quarkus by apache.
the class CamelJpaRecorder method createJpaComponent.
public RuntimeValue<JpaComponent> createJpaComponent() {
TransactionManager transactionManager = com.arjuna.ats.jta.TransactionManager.transactionManager();
UserTransaction userTransaction = com.arjuna.ats.jta.UserTransaction.userTransaction();
JpaComponent component = new JpaComponent();
component.setTransactionManager(new JtaTransactionManager(userTransaction, transactionManager));
return new RuntimeValue<>(component);
}
use of io.quarkus.runtime.RuntimeValue in project camel-quarkus by apache.
the class FhirContextRecorder method createR4FhirContext.
public RuntimeValue<FhirContext> createR4FhirContext(Collection<String> resourceDefinitions) {
FhirContext fhirContext = FhirContext.forR4();
initContext(resourceDefinitions, fhirContext);
return new RuntimeValue<>(fhirContext);
}
use of io.quarkus.runtime.RuntimeValue in project camel-quarkus by apache.
the class CamelFreemarkerRecorder method createComponent.
public RuntimeValue<FreemarkerComponent> createComponent(BeanContainer beanContainer) {
final Configuration configuration = beanContainer.instance(Configuration.class);
final FreemarkerComponent component = new FreemarkerComponent();
component.setConfiguration(configuration);
return new RuntimeValue<>(component);
}
Aggregations