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

import org.apache.camel.AsyncCallback;
import org.apache.camel.Exchange;
import org.apache.camel.spi.InvokeOnHeaderStrategy;
import org.apache.camel.component.consul.endpoint.ConsulPreparedQueryProducer;

/**
 * Generated by camel build tools - do NOT edit this file!
 */
@SuppressWarnings("unchecked")
public class ConsulPreparedQueryProducerInvokeOnHeaderFactory implements InvokeOnHeaderStrategy {

    @Override
    public Object invoke(Object obj, String key, Exchange exchange, AsyncCallback callback) throws Exception {
        org.apache.camel.component.consul.endpoint.ConsulPreparedQueryProducer target = (org.apache.camel.component.consul.endpoint.ConsulPreparedQueryProducer) obj;
        switch (key) {
        case "create":
        case "CREATE": target.create(exchange.getMessage()); return null;
        case "execute":
        case "EXECUTE": target.execute(exchange.getMessage()); return null;
        case "get":
        case "GET": target.get(exchange.getMessage()); return null;
        default: return null;
        }
    }

}

