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

org.apache.camel.component.knative.http.KnativeHttpComponentConfigurer Maven / Gradle / Ivy

There is a newer version: 1.12.0
Show newest version
/* Generated by org.apache.camel:apt */
package org.apache.camel.component.knative.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 KnativeHttpComponentConfigurer 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 "vertx": ((KnativeHttpComponent) component).setVertx(property(camelContext, io.vertx.core.Vertx.class, value)); return true;
        case "vertxOptions": ((KnativeHttpComponent) component).setVertxOptions(property(camelContext, io.vertx.core.VertxOptions.class, value)); return true;
        case "vertxHttpServerOptions": ((KnativeHttpComponent) component).setVertxHttpServerOptions(property(camelContext, io.vertx.core.http.HttpServerOptions.class, value)); return true;
        case "vertxHttpClientOptions": ((KnativeHttpComponent) component).setVertxHttpClientOptions(property(camelContext, io.vertx.ext.web.client.WebClientOptions.class, value)); return true;
        case "basicPropertyBinding": ((KnativeHttpComponent) 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 "vertx": ((KnativeHttpComponent) component).setVertx(property(camelContext, io.vertx.core.Vertx.class, value)); return true;
        case "vertxoptions": ((KnativeHttpComponent) component).setVertxOptions(property(camelContext, io.vertx.core.VertxOptions.class, value)); return true;
        case "vertxhttpserveroptions": ((KnativeHttpComponent) component).setVertxHttpServerOptions(property(camelContext, io.vertx.core.http.HttpServerOptions.class, value)); return true;
        case "vertxhttpclientoptions": ((KnativeHttpComponent) component).setVertxHttpClientOptions(property(camelContext, io.vertx.ext.web.client.WebClientOptions.class, value)); return true;
        case "basicpropertybinding": ((KnativeHttpComponent) component).setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
            default: return false;
        }
    }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy