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

org.apache.camel.component.scheduler.SchedulerEndpointConfigurer Maven / Gradle / Ivy

There is a newer version: 4.9.0
Show newest version
/* Generated by org.apache.camel:apt */
package org.apache.camel.component.scheduler;

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 SchedulerEndpointConfigurer 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 "concurrentTasks": ((SchedulerEndpoint) endpoint).setConcurrentTasks(property(camelContext, int.class, value)); return true;
        case "startScheduler": ((SchedulerEndpoint) endpoint).setStartScheduler(property(camelContext, boolean.class, value)); return true;
        case "initialDelay": ((SchedulerEndpoint) endpoint).setInitialDelay(property(camelContext, long.class, value)); return true;
        case "delay": ((SchedulerEndpoint) endpoint).setDelay(property(camelContext, long.class, value)); return true;
        case "timeUnit": ((SchedulerEndpoint) endpoint).setTimeUnit(property(camelContext, java.util.concurrent.TimeUnit.class, value)); return true;
        case "useFixedDelay": ((SchedulerEndpoint) endpoint).setUseFixedDelay(property(camelContext, boolean.class, value)); return true;
        case "pollStrategy": ((SchedulerEndpoint) endpoint).setPollStrategy(property(camelContext, org.apache.camel.spi.PollingConsumerPollStrategy.class, value)); return true;
        case "runLoggingLevel": ((SchedulerEndpoint) endpoint).setRunLoggingLevel(property(camelContext, org.apache.camel.LoggingLevel.class, value)); return true;
        case "sendEmptyMessageWhenIdle": ((SchedulerEndpoint) endpoint).setSendEmptyMessageWhenIdle(property(camelContext, boolean.class, value)); return true;
        case "greedy": ((SchedulerEndpoint) endpoint).setGreedy(property(camelContext, boolean.class, value)); return true;
        case "scheduler": ((SchedulerEndpoint) endpoint).setScheduler(property(camelContext, java.lang.String.class, value)); return true;
        case "schedulerProperties": ((SchedulerEndpoint) endpoint).setSchedulerProperties(property(camelContext, java.util.Map.class, value)); return true;
        case "scheduledExecutorService": ((SchedulerEndpoint) endpoint).setScheduledExecutorService(property(camelContext, java.util.concurrent.ScheduledExecutorService.class, value)); return true;
        case "backoffMultiplier": ((SchedulerEndpoint) endpoint).setBackoffMultiplier(property(camelContext, int.class, value)); return true;
        case "backoffIdleThreshold": ((SchedulerEndpoint) endpoint).setBackoffIdleThreshold(property(camelContext, int.class, value)); return true;
        case "backoffErrorThreshold": ((SchedulerEndpoint) endpoint).setBackoffErrorThreshold(property(camelContext, int.class, value)); return true;
        case "repeatCount": ((SchedulerEndpoint) endpoint).setRepeatCount(property(camelContext, long.class, value)); return true;
        case "lazyStartProducer": ((SchedulerEndpoint) endpoint).setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "bridgeErrorHandler": ((SchedulerEndpoint) endpoint).setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
        case "exceptionHandler": ((SchedulerEndpoint) endpoint).setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
        case "exchangePattern": ((SchedulerEndpoint) endpoint).setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
        case "synchronous": ((SchedulerEndpoint) endpoint).setSynchronous(property(camelContext, boolean.class, value)); return true;
        case "basicPropertyBinding": ((SchedulerEndpoint) 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 "concurrenttasks": ((SchedulerEndpoint) endpoint).setConcurrentTasks(property(camelContext, int.class, value)); return true;
        case "startscheduler": ((SchedulerEndpoint) endpoint).setStartScheduler(property(camelContext, boolean.class, value)); return true;
        case "initialdelay": ((SchedulerEndpoint) endpoint).setInitialDelay(property(camelContext, long.class, value)); return true;
        case "delay": ((SchedulerEndpoint) endpoint).setDelay(property(camelContext, long.class, value)); return true;
        case "timeunit": ((SchedulerEndpoint) endpoint).setTimeUnit(property(camelContext, java.util.concurrent.TimeUnit.class, value)); return true;
        case "usefixeddelay": ((SchedulerEndpoint) endpoint).setUseFixedDelay(property(camelContext, boolean.class, value)); return true;
        case "pollstrategy": ((SchedulerEndpoint) endpoint).setPollStrategy(property(camelContext, org.apache.camel.spi.PollingConsumerPollStrategy.class, value)); return true;
        case "runlogginglevel": ((SchedulerEndpoint) endpoint).setRunLoggingLevel(property(camelContext, org.apache.camel.LoggingLevel.class, value)); return true;
        case "sendemptymessagewhenidle": ((SchedulerEndpoint) endpoint).setSendEmptyMessageWhenIdle(property(camelContext, boolean.class, value)); return true;
        case "greedy": ((SchedulerEndpoint) endpoint).setGreedy(property(camelContext, boolean.class, value)); return true;
        case "scheduler": ((SchedulerEndpoint) endpoint).setScheduler(property(camelContext, java.lang.String.class, value)); return true;
        case "schedulerproperties": ((SchedulerEndpoint) endpoint).setSchedulerProperties(property(camelContext, java.util.Map.class, value)); return true;
        case "scheduledexecutorservice": ((SchedulerEndpoint) endpoint).setScheduledExecutorService(property(camelContext, java.util.concurrent.ScheduledExecutorService.class, value)); return true;
        case "backoffmultiplier": ((SchedulerEndpoint) endpoint).setBackoffMultiplier(property(camelContext, int.class, value)); return true;
        case "backoffidlethreshold": ((SchedulerEndpoint) endpoint).setBackoffIdleThreshold(property(camelContext, int.class, value)); return true;
        case "backofferrorthreshold": ((SchedulerEndpoint) endpoint).setBackoffErrorThreshold(property(camelContext, int.class, value)); return true;
        case "repeatcount": ((SchedulerEndpoint) endpoint).setRepeatCount(property(camelContext, long.class, value)); return true;
        case "lazystartproducer": ((SchedulerEndpoint) endpoint).setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "bridgeerrorhandler": ((SchedulerEndpoint) endpoint).setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
        case "exceptionhandler": ((SchedulerEndpoint) endpoint).setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
        case "exchangepattern": ((SchedulerEndpoint) endpoint).setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
        case "synchronous": ((SchedulerEndpoint) endpoint).setSynchronous(property(camelContext, boolean.class, value)); return true;
        case "basicpropertybinding": ((SchedulerEndpoint) endpoint).setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
            default: return false;
        }
    }

}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy