org.apache.camel.component.zookeeper.ZooKeeperEndpointConfigurer Maven / Gradle / Ivy
/* Generated by org.apache.camel:apt */
package org.apache.camel.component.zookeeper;
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 ZooKeeperEndpointConfigurer 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 "timeout": ((ZooKeeperEndpoint) endpoint).getConfiguration().setTimeout(property(camelContext, int.class, value)); return true;
case "backoff": ((ZooKeeperEndpoint) endpoint).getConfiguration().setBackoff(property(camelContext, long.class, value)); return true;
case "repeat": ((ZooKeeperEndpoint) endpoint).getConfiguration().setRepeat(property(camelContext, boolean.class, value)); return true;
case "listChildren": ((ZooKeeperEndpoint) endpoint).getConfiguration().setListChildren(property(camelContext, boolean.class, value)); return true;
case "create": ((ZooKeeperEndpoint) endpoint).getConfiguration().setCreate(property(camelContext, boolean.class, value)); return true;
case "createMode": ((ZooKeeperEndpoint) endpoint).getConfiguration().setCreateMode(property(camelContext, java.lang.String.class, value)); return true;
case "sendEmptyMessageOnDelete": ((ZooKeeperEndpoint) endpoint).getConfiguration().setSendEmptyMessageOnDelete(property(camelContext, boolean.class, value)); return true;
case "lazyStartProducer": ((ZooKeeperEndpoint) endpoint).setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
case "bridgeErrorHandler": ((ZooKeeperEndpoint) endpoint).setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
case "exceptionHandler": ((ZooKeeperEndpoint) endpoint).setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
case "exchangePattern": ((ZooKeeperEndpoint) endpoint).setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
case "synchronous": ((ZooKeeperEndpoint) endpoint).setSynchronous(property(camelContext, boolean.class, value)); return true;
case "basicPropertyBinding": ((ZooKeeperEndpoint) 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 "timeout": ((ZooKeeperEndpoint) endpoint).getConfiguration().setTimeout(property(camelContext, int.class, value)); return true;
case "backoff": ((ZooKeeperEndpoint) endpoint).getConfiguration().setBackoff(property(camelContext, long.class, value)); return true;
case "repeat": ((ZooKeeperEndpoint) endpoint).getConfiguration().setRepeat(property(camelContext, boolean.class, value)); return true;
case "listchildren": ((ZooKeeperEndpoint) endpoint).getConfiguration().setListChildren(property(camelContext, boolean.class, value)); return true;
case "create": ((ZooKeeperEndpoint) endpoint).getConfiguration().setCreate(property(camelContext, boolean.class, value)); return true;
case "createmode": ((ZooKeeperEndpoint) endpoint).getConfiguration().setCreateMode(property(camelContext, java.lang.String.class, value)); return true;
case "sendemptymessageondelete": ((ZooKeeperEndpoint) endpoint).getConfiguration().setSendEmptyMessageOnDelete(property(camelContext, boolean.class, value)); return true;
case "lazystartproducer": ((ZooKeeperEndpoint) endpoint).setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
case "bridgeerrorhandler": ((ZooKeeperEndpoint) endpoint).setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
case "exceptionhandler": ((ZooKeeperEndpoint) endpoint).setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
case "exchangepattern": ((ZooKeeperEndpoint) endpoint).setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
case "synchronous": ((ZooKeeperEndpoint) endpoint).setSynchronous(property(camelContext, boolean.class, value)); return true;
case "basicpropertybinding": ((ZooKeeperEndpoint) endpoint).setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
default: return false;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy