/* 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.ConsulSessionProducer;

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

    @Override
    public Object invoke(Object obj, String key, Exchange exchange, AsyncCallback callback) throws Exception {
        org.apache.camel.component.consul.endpoint.ConsulSessionProducer target = (org.apache.camel.component.consul.endpoint.ConsulSessionProducer) obj;
        switch (key) {
        case "create":
        case "CREATE": target.create(exchange.getMessage()); return null;
        case "destroy":
        case "DESTROY": target.destroy(exchange.getMessage()); return null;
        case "info":
        case "INFO": target.info(exchange.getMessage()); return null;
        case "list":
        case "LIST": target.list(exchange.getMessage()); return null;
        case "renew":
        case "RENEW": target.renew(exchange.getMessage()); return null;
        default: return null;
        }
    }

}

