org.apache.camel.component.metrics.MetricsEndpointConfigurer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of camel-metrics Show documentation
Show all versions of camel-metrics Show documentation
Camel Metrics based monitoring component
/* Generated by camel build tools - do NOT edit this file! */
package org.apache.camel.component.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 MetricsEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {
@Override
public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
MetricsEndpoint target = (MetricsEndpoint) obj;
switch (ignoreCase ? name.toLowerCase() : name) {
case "action": target.setAction(property(camelContext, org.apache.camel.component.metrics.MetricsTimerAction.class, value)); return true;
case "decrement": target.setDecrement(property(camelContext, java.lang.Long.class, value)); return true;
case "increment": target.setIncrement(property(camelContext, java.lang.Long.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 "subject": target.setSubject(property(camelContext, java.lang.Object.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 org.apache.camel.component.metrics.MetricsTimerAction.class;
case "decrement": return java.lang.Long.class;
case "increment": return java.lang.Long.class;
case "lazystartproducer":
case "lazyStartProducer": return boolean.class;
case "mark": return java.lang.Long.class;
case "subject": return java.lang.Object.class;
case "value": return java.lang.Long.class;
default: return null;
}
}
@Override
public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
MetricsEndpoint target = (MetricsEndpoint) obj;
switch (ignoreCase ? name.toLowerCase() : name) {
case "action": return target.getAction();
case "decrement": return target.getDecrement();
case "increment": return target.getIncrement();
case "lazystartproducer":
case "lazyStartProducer": return target.isLazyStartProducer();
case "mark": return target.getMark();
case "subject": return target.getSubject();
case "value": return target.getValue();
default: return null;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy