org.apache.camel.component.ganglia.GangliaEndpointConfigurer Maven / Gradle / Ivy
/* Generated by org.apache.camel:apt */
package org.apache.camel.component.ganglia;
import java.util.HashMap;
import java.util.Map;
import org.apache.camel.CamelContext;
import org.apache.camel.spi.GeneratedPropertyConfigurer;
import org.apache.camel.support.component.PropertyConfigurerSupport;
/**
* Source code generated by org.apache.camel:apt
*/
@SuppressWarnings("unchecked")
public class GangliaEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer {
@Override
public boolean configure(CamelContext camelContext, Object endpoint, String name, Object value, boolean ignoreCase) {
if (ignoreCase) {
return doConfigureIgnoreCase(camelContext, endpoint, name, value);
} else {
return doConfigure(camelContext, endpoint, name, value);
}
}
private static boolean doConfigure(CamelContext camelContext, Object endpoint, String name, Object value) {
switch (name) {
case "mode": ((GangliaEndpoint) endpoint).getConfiguration().setMode(property(camelContext, info.ganglia.gmetric4j.gmetric.GMetric.UDPAddressingMode.class, value)); return true;
case "ttl": ((GangliaEndpoint) endpoint).getConfiguration().setTtl(property(camelContext, int.class, value)); return true;
case "wireFormat31x": ((GangliaEndpoint) endpoint).getConfiguration().setWireFormat31x(property(camelContext, boolean.class, value)); return true;
case "spoofHostname": ((GangliaEndpoint) endpoint).getConfiguration().setSpoofHostname(property(camelContext, java.lang.String.class, value)); return true;
case "groupName": ((GangliaEndpoint) endpoint).getConfiguration().setGroupName(property(camelContext, java.lang.String.class, value)); return true;
case "prefix": ((GangliaEndpoint) endpoint).getConfiguration().setPrefix(property(camelContext, java.lang.String.class, value)); return true;
case "metricName": ((GangliaEndpoint) endpoint).getConfiguration().setMetricName(property(camelContext, java.lang.String.class, value)); return true;
case "type": ((GangliaEndpoint) endpoint).getConfiguration().setType(property(camelContext, info.ganglia.gmetric4j.gmetric.GMetricType.class, value)); return true;
case "slope": ((GangliaEndpoint) endpoint).getConfiguration().setSlope(property(camelContext, info.ganglia.gmetric4j.gmetric.GMetricSlope.class, value)); return true;
case "units": ((GangliaEndpoint) endpoint).getConfiguration().setUnits(property(camelContext, java.lang.String.class, value)); return true;
case "tmax": ((GangliaEndpoint) endpoint).getConfiguration().setTmax(property(camelContext, int.class, value)); return true;
case "dmax": ((GangliaEndpoint) endpoint).getConfiguration().setDmax(property(camelContext, int.class, value)); return true;
case "lazyStartProducer": ((GangliaEndpoint) endpoint).setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
case "bridgeErrorHandler": ((GangliaEndpoint) endpoint).setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
case "exceptionHandler": ((GangliaEndpoint) endpoint).setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
case "exchangePattern": ((GangliaEndpoint) endpoint).setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
case "synchronous": ((GangliaEndpoint) endpoint).setSynchronous(property(camelContext, boolean.class, value)); return true;
case "basicPropertyBinding": ((GangliaEndpoint) endpoint).setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
default: return false;
}
}
private static boolean doConfigureIgnoreCase(CamelContext camelContext, Object endpoint, String name, Object value) {
switch (name.toLowerCase()) {
case "mode": ((GangliaEndpoint) endpoint).getConfiguration().setMode(property(camelContext, info.ganglia.gmetric4j.gmetric.GMetric.UDPAddressingMode.class, value)); return true;
case "ttl": ((GangliaEndpoint) endpoint).getConfiguration().setTtl(property(camelContext, int.class, value)); return true;
case "wireformat31x": ((GangliaEndpoint) endpoint).getConfiguration().setWireFormat31x(property(camelContext, boolean.class, value)); return true;
case "spoofhostname": ((GangliaEndpoint) endpoint).getConfiguration().setSpoofHostname(property(camelContext, java.lang.String.class, value)); return true;
case "groupname": ((GangliaEndpoint) endpoint).getConfiguration().setGroupName(property(camelContext, java.lang.String.class, value)); return true;
case "prefix": ((GangliaEndpoint) endpoint).getConfiguration().setPrefix(property(camelContext, java.lang.String.class, value)); return true;
case "metricname": ((GangliaEndpoint) endpoint).getConfiguration().setMetricName(property(camelContext, java.lang.String.class, value)); return true;
case "type": ((GangliaEndpoint) endpoint).getConfiguration().setType(property(camelContext, info.ganglia.gmetric4j.gmetric.GMetricType.class, value)); return true;
case "slope": ((GangliaEndpoint) endpoint).getConfiguration().setSlope(property(camelContext, info.ganglia.gmetric4j.gmetric.GMetricSlope.class, value)); return true;
case "units": ((GangliaEndpoint) endpoint).getConfiguration().setUnits(property(camelContext, java.lang.String.class, value)); return true;
case "tmax": ((GangliaEndpoint) endpoint).getConfiguration().setTmax(property(camelContext, int.class, value)); return true;
case "dmax": ((GangliaEndpoint) endpoint).getConfiguration().setDmax(property(camelContext, int.class, value)); return true;
case "lazystartproducer": ((GangliaEndpoint) endpoint).setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
case "bridgeerrorhandler": ((GangliaEndpoint) endpoint).setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
case "exceptionhandler": ((GangliaEndpoint) endpoint).setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
case "exchangepattern": ((GangliaEndpoint) endpoint).setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
case "synchronous": ((GangliaEndpoint) endpoint).setSynchronous(property(camelContext, boolean.class, value)); return true;
case "basicpropertybinding": ((GangliaEndpoint) endpoint).setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
default: return false;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy