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

org.apache.camel.throttling.ThrottlingInflightRoutePolicyConfigurer Maven / Gradle / Ivy

The newest version!
/* Generated by camel build tools - do NOT edit this file! */
package org.apache.camel.throttling;

import javax.annotation.processing.Generated;
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.throttling.ThrottlingInflightRoutePolicy;

/**
 * Generated by camel build tools - do NOT edit this file!
 */
@Generated("org.apache.camel.maven.packaging.GenerateConfigurerMojo")
@SuppressWarnings("unchecked")
public class ThrottlingInflightRoutePolicyConfigurer 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.throttling.ThrottlingInflightRoutePolicy target = (org.apache.camel.throttling.ThrottlingInflightRoutePolicy) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "logginglevel":
        case "loggingLevel": target.setLoggingLevel(property(camelContext, org.apache.camel.LoggingLevel.class, value)); return true;
        case "maxinflightexchanges":
        case "maxInflightExchanges": target.setMaxInflightExchanges(property(camelContext, int.class, value)); return true;
        case "resumepercentofmax":
        case "resumePercentOfMax": target.setResumePercentOfMax(property(camelContext, int.class, value)); return true;
        case "scope": target.setScope(property(camelContext, org.apache.camel.throttling.ThrottlingInflightRoutePolicy.ThrottlingScope.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public Class getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "logginglevel":
        case "loggingLevel": return org.apache.camel.LoggingLevel.class;
        case "maxinflightexchanges":
        case "maxInflightExchanges": return int.class;
        case "resumepercentofmax":
        case "resumePercentOfMax": return int.class;
        case "scope": return org.apache.camel.throttling.ThrottlingInflightRoutePolicy.ThrottlingScope.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        org.apache.camel.throttling.ThrottlingInflightRoutePolicy target = (org.apache.camel.throttling.ThrottlingInflightRoutePolicy) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "logginglevel":
        case "loggingLevel": return target.getLoggingLevel();
        case "maxinflightexchanges":
        case "maxInflightExchanges": return target.getMaxInflightExchanges();
        case "resumepercentofmax":
        case "resumePercentOfMax": return target.getResumePercentOfMax();
        case "scope": return target.getScope();
        default: return null;
        }
    }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy