All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.camel.opentelemetry.OpenTelemetryTracerConfigurer Maven / Gradle / Ivy

There is a newer version: 4.8.1
Show newest version
/* Generated by camel build tools - do NOT edit this file! */
package org.apache.camel.opentelemetry;

import javax.annotation.processing.Generated;
import java.util.Map;

import org.apache.camel.CamelContext;
import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
import org.apache.camel.spi.PropertyConfigurerGetter;
import org.apache.camel.spi.ConfigurerStrategy;
import org.apache.camel.spi.GeneratedPropertyConfigurer;
import org.apache.camel.util.CaseInsensitiveMap;
import org.apache.camel.opentelemetry.OpenTelemetryTracer;

/**
 * Generated by camel build tools - do NOT edit this file!
 */
@Generated("org.apache.camel.maven.packaging.GenerateConfigurerMojo")
@SuppressWarnings("unchecked")
public class OpenTelemetryTracerConfigurer extends org.apache.camel.support.component.PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        org.apache.camel.opentelemetry.OpenTelemetryTracer target = (org.apache.camel.opentelemetry.OpenTelemetryTracer) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "camelcontext":
        case "camelContext": target.setCamelContext(property(camelContext, org.apache.camel.CamelContext.class, value)); return true;
        case "contextpropagators":
        case "contextPropagators": target.setContextPropagators(property(camelContext, io.opentelemetry.context.propagation.ContextPropagators.class, value)); return true;
        case "encoding": target.setEncoding(property(camelContext, boolean.class, value)); return true;
        case "excludepatterns":
        case "excludePatterns": target.setExcludePatterns(property(camelContext, java.lang.String.class, value)); return true;
        case "instrumentationname":
        case "instrumentationName": target.setInstrumentationName(property(camelContext, java.lang.String.class, value)); return true;
        case "traceprocessors":
        case "traceProcessors": target.setTraceProcessors(property(camelContext, boolean.class, value)); return true;
        case "tracer": target.setTracer(property(camelContext, io.opentelemetry.api.trace.Tracer.class, value)); return true;
        case "tracingstrategy":
        case "tracingStrategy": target.setTracingStrategy(property(camelContext, org.apache.camel.spi.InterceptStrategy.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public Class getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "camelcontext":
        case "camelContext": return org.apache.camel.CamelContext.class;
        case "contextpropagators":
        case "contextPropagators": return io.opentelemetry.context.propagation.ContextPropagators.class;
        case "encoding": return boolean.class;
        case "excludepatterns":
        case "excludePatterns": return java.lang.String.class;
        case "instrumentationname":
        case "instrumentationName": return java.lang.String.class;
        case "traceprocessors":
        case "traceProcessors": return boolean.class;
        case "tracer": return io.opentelemetry.api.trace.Tracer.class;
        case "tracingstrategy":
        case "tracingStrategy": return org.apache.camel.spi.InterceptStrategy.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        org.apache.camel.opentelemetry.OpenTelemetryTracer target = (org.apache.camel.opentelemetry.OpenTelemetryTracer) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "camelcontext":
        case "camelContext": return target.getCamelContext();
        case "contextpropagators":
        case "contextPropagators": return target.getContextPropagators();
        case "encoding": return target.isEncoding();
        case "excludepatterns":
        case "excludePatterns": return target.getExcludePatterns();
        case "instrumentationname":
        case "instrumentationName": return target.getInstrumentationName();
        case "traceprocessors":
        case "traceProcessors": return target.isTraceProcessors();
        case "tracer": return target.getTracer();
        case "tracingstrategy":
        case "tracingStrategy": return target.getTracingStrategy();
        default: return null;
        }
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy