All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.camel.component.aws.ec2.EC2EndpointConfigurer Maven / Gradle / Ivy

/* Generated by org.apache.camel:apt */
package org.apache.camel.component.aws.ec2;

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 EC2EndpointConfigurer 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 "amazonEc2Client": ((EC2Endpoint) endpoint).getConfiguration().setAmazonEc2Client(property(camelContext, com.amazonaws.services.ec2.AmazonEC2.class, value)); return true;
        case "accessKey": ((EC2Endpoint) endpoint).getConfiguration().setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
        case "secretKey": ((EC2Endpoint) endpoint).getConfiguration().setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
        case "operation": ((EC2Endpoint) endpoint).getConfiguration().setOperation(property(camelContext, org.apache.camel.component.aws.ec2.EC2Operations.class, value)); return true;
        case "proxyHost": ((EC2Endpoint) endpoint).getConfiguration().setProxyHost(property(camelContext, java.lang.String.class, value)); return true;
        case "proxyPort": ((EC2Endpoint) endpoint).getConfiguration().setProxyPort(property(camelContext, java.lang.Integer.class, value)); return true;
        case "region": ((EC2Endpoint) endpoint).getConfiguration().setRegion(property(camelContext, java.lang.String.class, value)); return true;
        case "startScheduler": ((EC2Endpoint) endpoint).setStartScheduler(property(camelContext, boolean.class, value)); return true;
        case "initialDelay": ((EC2Endpoint) endpoint).setInitialDelay(property(camelContext, long.class, value)); return true;
        case "delay": ((EC2Endpoint) endpoint).setDelay(property(camelContext, long.class, value)); return true;
        case "timeUnit": ((EC2Endpoint) endpoint).setTimeUnit(property(camelContext, java.util.concurrent.TimeUnit.class, value)); return true;
        case "useFixedDelay": ((EC2Endpoint) endpoint).setUseFixedDelay(property(camelContext, boolean.class, value)); return true;
        case "pollStrategy": ((EC2Endpoint) endpoint).setPollStrategy(property(camelContext, org.apache.camel.spi.PollingConsumerPollStrategy.class, value)); return true;
        case "runLoggingLevel": ((EC2Endpoint) endpoint).setRunLoggingLevel(property(camelContext, org.apache.camel.LoggingLevel.class, value)); return true;
        case "sendEmptyMessageWhenIdle": ((EC2Endpoint) endpoint).setSendEmptyMessageWhenIdle(property(camelContext, boolean.class, value)); return true;
        case "greedy": ((EC2Endpoint) endpoint).setGreedy(property(camelContext, boolean.class, value)); return true;
        case "scheduler": ((EC2Endpoint) endpoint).setScheduler(property(camelContext, java.lang.String.class, value)); return true;
        case "schedulerProperties": ((EC2Endpoint) endpoint).setSchedulerProperties(property(camelContext, java.util.Map.class, value)); return true;
        case "scheduledExecutorService": ((EC2Endpoint) endpoint).setScheduledExecutorService(property(camelContext, java.util.concurrent.ScheduledExecutorService.class, value)); return true;
        case "backoffMultiplier": ((EC2Endpoint) endpoint).setBackoffMultiplier(property(camelContext, int.class, value)); return true;
        case "backoffIdleThreshold": ((EC2Endpoint) endpoint).setBackoffIdleThreshold(property(camelContext, int.class, value)); return true;
        case "backoffErrorThreshold": ((EC2Endpoint) endpoint).setBackoffErrorThreshold(property(camelContext, int.class, value)); return true;
        case "lazyStartProducer": ((EC2Endpoint) endpoint).setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "bridgeErrorHandler": ((EC2Endpoint) endpoint).setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
        case "exceptionHandler": ((EC2Endpoint) endpoint).setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
        case "exchangePattern": ((EC2Endpoint) endpoint).setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
        case "synchronous": ((EC2Endpoint) endpoint).setSynchronous(property(camelContext, boolean.class, value)); return true;
        case "basicPropertyBinding": ((EC2Endpoint) 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 "amazonec2client": ((EC2Endpoint) endpoint).getConfiguration().setAmazonEc2Client(property(camelContext, com.amazonaws.services.ec2.AmazonEC2.class, value)); return true;
        case "accesskey": ((EC2Endpoint) endpoint).getConfiguration().setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
        case "secretkey": ((EC2Endpoint) endpoint).getConfiguration().setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
        case "operation": ((EC2Endpoint) endpoint).getConfiguration().setOperation(property(camelContext, org.apache.camel.component.aws.ec2.EC2Operations.class, value)); return true;
        case "proxyhost": ((EC2Endpoint) endpoint).getConfiguration().setProxyHost(property(camelContext, java.lang.String.class, value)); return true;
        case "proxyport": ((EC2Endpoint) endpoint).getConfiguration().setProxyPort(property(camelContext, java.lang.Integer.class, value)); return true;
        case "region": ((EC2Endpoint) endpoint).getConfiguration().setRegion(property(camelContext, java.lang.String.class, value)); return true;
        case "startscheduler": ((EC2Endpoint) endpoint).setStartScheduler(property(camelContext, boolean.class, value)); return true;
        case "initialdelay": ((EC2Endpoint) endpoint).setInitialDelay(property(camelContext, long.class, value)); return true;
        case "delay": ((EC2Endpoint) endpoint).setDelay(property(camelContext, long.class, value)); return true;
        case "timeunit": ((EC2Endpoint) endpoint).setTimeUnit(property(camelContext, java.util.concurrent.TimeUnit.class, value)); return true;
        case "usefixeddelay": ((EC2Endpoint) endpoint).setUseFixedDelay(property(camelContext, boolean.class, value)); return true;
        case "pollstrategy": ((EC2Endpoint) endpoint).setPollStrategy(property(camelContext, org.apache.camel.spi.PollingConsumerPollStrategy.class, value)); return true;
        case "runlogginglevel": ((EC2Endpoint) endpoint).setRunLoggingLevel(property(camelContext, org.apache.camel.LoggingLevel.class, value)); return true;
        case "sendemptymessagewhenidle": ((EC2Endpoint) endpoint).setSendEmptyMessageWhenIdle(property(camelContext, boolean.class, value)); return true;
        case "greedy": ((EC2Endpoint) endpoint).setGreedy(property(camelContext, boolean.class, value)); return true;
        case "scheduler": ((EC2Endpoint) endpoint).setScheduler(property(camelContext, java.lang.String.class, value)); return true;
        case "schedulerproperties": ((EC2Endpoint) endpoint).setSchedulerProperties(property(camelContext, java.util.Map.class, value)); return true;
        case "scheduledexecutorservice": ((EC2Endpoint) endpoint).setScheduledExecutorService(property(camelContext, java.util.concurrent.ScheduledExecutorService.class, value)); return true;
        case "backoffmultiplier": ((EC2Endpoint) endpoint).setBackoffMultiplier(property(camelContext, int.class, value)); return true;
        case "backoffidlethreshold": ((EC2Endpoint) endpoint).setBackoffIdleThreshold(property(camelContext, int.class, value)); return true;
        case "backofferrorthreshold": ((EC2Endpoint) endpoint).setBackoffErrorThreshold(property(camelContext, int.class, value)); return true;
        case "lazystartproducer": ((EC2Endpoint) endpoint).setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "bridgeerrorhandler": ((EC2Endpoint) endpoint).setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
        case "exceptionhandler": ((EC2Endpoint) endpoint).setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
        case "exchangepattern": ((EC2Endpoint) endpoint).setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
        case "synchronous": ((EC2Endpoint) endpoint).setSynchronous(property(camelContext, boolean.class, value)); return true;
        case "basicpropertybinding": ((EC2Endpoint) endpoint).setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
            default: return false;
        }
    }

}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy