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

org.apache.camel.main.ThreadPoolProfileConfigurationPropertiesConfigurer Maven / Gradle / Ivy

/* Generated by camel build tools - do NOT edit this file! */
package org.apache.camel.main;

import java.util.Map;

import org.apache.camel.CamelContext;
import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
import org.apache.camel.spi.PropertyConfigurerGetter;
import org.apache.camel.spi.ConfigurerStrategy;
import org.apache.camel.spi.GeneratedPropertyConfigurer;
import org.apache.camel.util.CaseInsensitiveMap;
import org.apache.camel.main.ThreadPoolProfileConfigurationProperties;

/**
 * Generated by camel build tools - do NOT edit this file!
 */
@SuppressWarnings("unchecked")
public class ThreadPoolProfileConfigurationPropertiesConfigurer extends org.apache.camel.support.component.PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        org.apache.camel.main.ThreadPoolProfileConfigurationProperties target = (org.apache.camel.main.ThreadPoolProfileConfigurationProperties) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "allowcorethreadtimeout":
        case "AllowCoreThreadTimeOut": target.setAllowCoreThreadTimeOut(property(camelContext, java.lang.Boolean.class, value)); return true;
        case "id":
        case "Id": target.setId(property(camelContext, java.lang.String.class, value)); return true;
        case "keepalivetime":
        case "KeepAliveTime": target.setKeepAliveTime(property(camelContext, java.lang.Long.class, value)); return true;
        case "maxpoolsize":
        case "MaxPoolSize": target.setMaxPoolSize(property(camelContext, java.lang.Integer.class, value)); return true;
        case "maxqueuesize":
        case "MaxQueueSize": target.setMaxQueueSize(property(camelContext, java.lang.Integer.class, value)); return true;
        case "poolsize":
        case "PoolSize": target.setPoolSize(property(camelContext, java.lang.Integer.class, value)); return true;
        case "rejectedpolicy":
        case "RejectedPolicy": target.setRejectedPolicy(property(camelContext, org.apache.camel.util.concurrent.ThreadPoolRejectedPolicy.class, value)); return true;
        case "timeunit":
        case "TimeUnit": target.setTimeUnit(property(camelContext, java.util.concurrent.TimeUnit.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public Class getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "allowcorethreadtimeout":
        case "AllowCoreThreadTimeOut": return java.lang.Boolean.class;
        case "id":
        case "Id": return java.lang.String.class;
        case "keepalivetime":
        case "KeepAliveTime": return java.lang.Long.class;
        case "maxpoolsize":
        case "MaxPoolSize": return java.lang.Integer.class;
        case "maxqueuesize":
        case "MaxQueueSize": return java.lang.Integer.class;
        case "poolsize":
        case "PoolSize": return java.lang.Integer.class;
        case "rejectedpolicy":
        case "RejectedPolicy": return org.apache.camel.util.concurrent.ThreadPoolRejectedPolicy.class;
        case "timeunit":
        case "TimeUnit": return java.util.concurrent.TimeUnit.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        org.apache.camel.main.ThreadPoolProfileConfigurationProperties target = (org.apache.camel.main.ThreadPoolProfileConfigurationProperties) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "allowcorethreadtimeout":
        case "AllowCoreThreadTimeOut": return target.getAllowCoreThreadTimeOut();
        case "id":
        case "Id": return target.getId();
        case "keepalivetime":
        case "KeepAliveTime": return target.getKeepAliveTime();
        case "maxpoolsize":
        case "MaxPoolSize": return target.getMaxPoolSize();
        case "maxqueuesize":
        case "MaxQueueSize": return target.getMaxQueueSize();
        case "poolsize":
        case "PoolSize": return target.getPoolSize();
        case "rejectedpolicy":
        case "RejectedPolicy": return target.getRejectedPolicy();
        case "timeunit":
        case "TimeUnit": return target.getTimeUnit();
        default: return null;
        }
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy