org.apache.camel.component.http.HttpComponentConfigurer Maven / Gradle / Ivy
/* Generated by org.apache.camel:apt */
package org.apache.camel.component.http;
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 HttpComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer {
@Override
public boolean configure(CamelContext camelContext, Object component, String name, Object value, boolean ignoreCase) {
if (ignoreCase) {
return doConfigureIgnoreCase(camelContext, component, name, value);
} else {
return doConfigure(camelContext, component, name, value);
}
}
private static boolean doConfigure(CamelContext camelContext, Object component, String name, Object value) {
switch (name) {
case "httpClientConfigurer": ((HttpComponent) component).setHttpClientConfigurer(property(camelContext, org.apache.camel.component.http.HttpClientConfigurer.class, value)); return true;
case "clientConnectionManager": ((HttpComponent) component).setClientConnectionManager(property(camelContext, org.apache.http.conn.HttpClientConnectionManager.class, value)); return true;
case "httpContext": ((HttpComponent) component).setHttpContext(property(camelContext, org.apache.http.protocol.HttpContext.class, value)); return true;
case "sslContextParameters": ((HttpComponent) component).setSslContextParameters(property(camelContext, org.apache.camel.support.jsse.SSLContextParameters.class, value)); return true;
case "useGlobalSslContextParameters": ((HttpComponent) component).setUseGlobalSslContextParameters(property(camelContext, boolean.class, value)); return true;
case "x509HostnameVerifier": ((HttpComponent) component).setX509HostnameVerifier(property(camelContext, javax.net.ssl.HostnameVerifier.class, value)); return true;
case "maxTotalConnections": ((HttpComponent) component).setMaxTotalConnections(property(camelContext, int.class, value)); return true;
case "connectionsPerRoute": ((HttpComponent) component).setConnectionsPerRoute(property(camelContext, int.class, value)); return true;
case "connectionTimeToLive": ((HttpComponent) component).setConnectionTimeToLive(property(camelContext, long.class, value)); return true;
case "cookieStore": ((HttpComponent) component).setCookieStore(property(camelContext, org.apache.http.client.CookieStore.class, value)); return true;
case "connectionRequestTimeout": ((HttpComponent) component).setConnectionRequestTimeout(property(camelContext, int.class, value)); return true;
case "connectTimeout": ((HttpComponent) component).setConnectTimeout(property(camelContext, int.class, value)); return true;
case "socketTimeout": ((HttpComponent) component).setSocketTimeout(property(camelContext, int.class, value)); return true;
case "httpBinding": ((HttpComponent) component).setHttpBinding(property(camelContext, org.apache.camel.http.common.HttpBinding.class, value)); return true;
case "httpConfiguration": ((HttpComponent) component).setHttpConfiguration(property(camelContext, org.apache.camel.http.common.HttpConfiguration.class, value)); return true;
case "allowJavaSerializedObject": ((HttpComponent) component).setAllowJavaSerializedObject(property(camelContext, boolean.class, value)); return true;
case "headerFilterStrategy": ((HttpComponent) component).setHeaderFilterStrategy(property(camelContext, org.apache.camel.spi.HeaderFilterStrategy.class, value)); return true;
case "basicPropertyBinding": ((HttpComponent) component).setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
default: return false;
}
}
private static boolean doConfigureIgnoreCase(CamelContext camelContext, Object component, String name, Object value) {
switch (name.toLowerCase()) {
case "httpclientconfigurer": ((HttpComponent) component).setHttpClientConfigurer(property(camelContext, org.apache.camel.component.http.HttpClientConfigurer.class, value)); return true;
case "clientconnectionmanager": ((HttpComponent) component).setClientConnectionManager(property(camelContext, org.apache.http.conn.HttpClientConnectionManager.class, value)); return true;
case "httpcontext": ((HttpComponent) component).setHttpContext(property(camelContext, org.apache.http.protocol.HttpContext.class, value)); return true;
case "sslcontextparameters": ((HttpComponent) component).setSslContextParameters(property(camelContext, org.apache.camel.support.jsse.SSLContextParameters.class, value)); return true;
case "useglobalsslcontextparameters": ((HttpComponent) component).setUseGlobalSslContextParameters(property(camelContext, boolean.class, value)); return true;
case "x509hostnameverifier": ((HttpComponent) component).setX509HostnameVerifier(property(camelContext, javax.net.ssl.HostnameVerifier.class, value)); return true;
case "maxtotalconnections": ((HttpComponent) component).setMaxTotalConnections(property(camelContext, int.class, value)); return true;
case "connectionsperroute": ((HttpComponent) component).setConnectionsPerRoute(property(camelContext, int.class, value)); return true;
case "connectiontimetolive": ((HttpComponent) component).setConnectionTimeToLive(property(camelContext, long.class, value)); return true;
case "cookiestore": ((HttpComponent) component).setCookieStore(property(camelContext, org.apache.http.client.CookieStore.class, value)); return true;
case "connectionrequesttimeout": ((HttpComponent) component).setConnectionRequestTimeout(property(camelContext, int.class, value)); return true;
case "connecttimeout": ((HttpComponent) component).setConnectTimeout(property(camelContext, int.class, value)); return true;
case "sockettimeout": ((HttpComponent) component).setSocketTimeout(property(camelContext, int.class, value)); return true;
case "httpbinding": ((HttpComponent) component).setHttpBinding(property(camelContext, org.apache.camel.http.common.HttpBinding.class, value)); return true;
case "httpconfiguration": ((HttpComponent) component).setHttpConfiguration(property(camelContext, org.apache.camel.http.common.HttpConfiguration.class, value)); return true;
case "allowjavaserializedobject": ((HttpComponent) component).setAllowJavaSerializedObject(property(camelContext, boolean.class, value)); return true;
case "headerfilterstrategy": ((HttpComponent) component).setHeaderFilterStrategy(property(camelContext, org.apache.camel.spi.HeaderFilterStrategy.class, value)); return true;
case "basicpropertybinding": ((HttpComponent) component).setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
default: return false;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy