org.apache.camel.component.spark.SparkEndpointConfigurer Maven / Gradle / Ivy
/* Generated by org.apache.camel:apt */
package org.apache.camel.component.spark;
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 SparkEndpointConfigurer 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 "rdd": ((SparkEndpoint) endpoint).setRdd(property(camelContext, org.apache.spark.api.java.JavaRDDLike.class, value)); return true;
case "rddCallback": ((SparkEndpoint) endpoint).setRddCallback(property(camelContext, org.apache.camel.component.spark.RddCallback.class, value)); return true;
case "dataFrame": ((SparkEndpoint) endpoint).setDataFrame(property(camelContext, org.apache.spark.sql.Dataset.class, value)); return true;
case "dataFrameCallback": ((SparkEndpoint) endpoint).setDataFrameCallback(property(camelContext, org.apache.camel.component.spark.DataFrameCallback.class, value)); return true;
case "collect": ((SparkEndpoint) endpoint).setCollect(property(camelContext, boolean.class, value)); return true;
case "lazyStartProducer": ((SparkEndpoint) endpoint).setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
case "bridgeErrorHandler": ((SparkEndpoint) endpoint).setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
case "exceptionHandler": ((SparkEndpoint) endpoint).setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
case "exchangePattern": ((SparkEndpoint) endpoint).setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
case "synchronous": ((SparkEndpoint) endpoint).setSynchronous(property(camelContext, boolean.class, value)); return true;
case "basicPropertyBinding": ((SparkEndpoint) 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 "rdd": ((SparkEndpoint) endpoint).setRdd(property(camelContext, org.apache.spark.api.java.JavaRDDLike.class, value)); return true;
case "rddcallback": ((SparkEndpoint) endpoint).setRddCallback(property(camelContext, org.apache.camel.component.spark.RddCallback.class, value)); return true;
case "dataframe": ((SparkEndpoint) endpoint).setDataFrame(property(camelContext, org.apache.spark.sql.Dataset.class, value)); return true;
case "dataframecallback": ((SparkEndpoint) endpoint).setDataFrameCallback(property(camelContext, org.apache.camel.component.spark.DataFrameCallback.class, value)); return true;
case "collect": ((SparkEndpoint) endpoint).setCollect(property(camelContext, boolean.class, value)); return true;
case "lazystartproducer": ((SparkEndpoint) endpoint).setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
case "bridgeerrorhandler": ((SparkEndpoint) endpoint).setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
case "exceptionhandler": ((SparkEndpoint) endpoint).setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
case "exchangepattern": ((SparkEndpoint) endpoint).setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
case "synchronous": ((SparkEndpoint) endpoint).setSynchronous(property(camelContext, boolean.class, value)); return true;
case "basicpropertybinding": ((SparkEndpoint) endpoint).setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
default: return false;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy