org.apache.camel.component.microprofile.metrics.MicroProfileMetricsEndpointConfigurer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of camel-microprofile-metrics Show documentation
Show all versions of camel-microprofile-metrics Show documentation
Camel metrics exposed with Eclipse MicroProfile Metrics
/* Generated by camel build tools - do NOT edit this file! */
package org.apache.camel.component.microprofile.metrics;
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.support.component.PropertyConfigurerSupport;
/**
* Generated by camel build tools - do NOT edit this file!
*/
@SuppressWarnings("unchecked")
public class MicroProfileMetricsEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
@Override
public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
MicroProfileMetricsEndpoint target = (MicroProfileMetricsEndpoint) obj;
switch (ignoreCase ? name.toLowerCase() : name) {
case "action": target.setAction(property(camelContext, java.lang.String.class, value)); return true;
case "counterincrement":
case "counterIncrement": target.setCounterIncrement(property(camelContext, java.lang.Long.class, value)); return true;
case "description": target.setDescription(property(camelContext, java.lang.String.class, value)); return true;
case "displayname":
case "displayName": target.setDisplayName(property(camelContext, java.lang.String.class, value)); return true;
case "gaugedecrement":
case "gaugeDecrement": target.setGaugeDecrement(property(camelContext, java.lang.Boolean.class, value)); return true;
case "gaugeincrement":
case "gaugeIncrement": target.setGaugeIncrement(property(camelContext, java.lang.Boolean.class, value)); return true;
case "gaugevalue":
case "gaugeValue": target.setGaugeValue(property(camelContext, java.lang.Number.class, value)); return true;
case "lazystartproducer":
case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
case "mark": target.setMark(property(camelContext, java.lang.Long.class, value)); return true;
case "metricunit":
case "metricUnit": target.setMetricUnit(property(camelContext, java.lang.String.class, value)); return true;
case "tags": target.setTags(property(camelContext, java.lang.String.class, value)); return true;
case "value": target.setValue(property(camelContext, java.lang.Long.class, value)); return true;
default: return false;
}
}
@Override
public Class> getOptionType(String name, boolean ignoreCase) {
switch (ignoreCase ? name.toLowerCase() : name) {
case "action": return java.lang.String.class;
case "counterincrement":
case "counterIncrement": return java.lang.Long.class;
case "description": return java.lang.String.class;
case "displayname":
case "displayName": return java.lang.String.class;
case "gaugedecrement":
case "gaugeDecrement": return java.lang.Boolean.class;
case "gaugeincrement":
case "gaugeIncrement": return java.lang.Boolean.class;
case "gaugevalue":
case "gaugeValue": return java.lang.Number.class;
case "lazystartproducer":
case "lazyStartProducer": return boolean.class;
case "mark": return java.lang.Long.class;
case "metricunit":
case "metricUnit": return java.lang.String.class;
case "tags": return java.lang.String.class;
case "value": return java.lang.Long.class;
default: return null;
}
}
@Override
public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
MicroProfileMetricsEndpoint target = (MicroProfileMetricsEndpoint) obj;
switch (ignoreCase ? name.toLowerCase() : name) {
case "action": return target.getAction();
case "counterincrement":
case "counterIncrement": return target.getCounterIncrement();
case "description": return target.getDescription();
case "displayname":
case "displayName": return target.getDisplayName();
case "gaugedecrement":
case "gaugeDecrement": return target.getGaugeDecrement();
case "gaugeincrement":
case "gaugeIncrement": return target.getGaugeIncrement();
case "gaugevalue":
case "gaugeValue": return target.getGaugeValue();
case "lazystartproducer":
case "lazyStartProducer": return target.isLazyStartProducer();
case "mark": return target.getMark();
case "metricunit":
case "metricUnit": return target.getMetricUnit();
case "tags": return target.getTags();
case "value": return target.getValue();
default: return null;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy