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

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

    @Override
    public Object invoke(Object obj, String key, Exchange exchange, AsyncCallback callback) throws Exception {
        org.apache.camel.component.consul.endpoint.ConsulAgentProducer target = (org.apache.camel.component.consul.endpoint.ConsulAgentProducer) obj;
        switch (key) {
        case "agent":
        case "AGENT": return target.invokeAgent(exchange.getMessage());
        case "checks":
        case "CHECKS": return target.invokeChecks(exchange.getMessage());
        case "deregister":
        case "DEREGISTER": target.invokeDeregister(exchange.getMessage()); return null;
        case "members":
        case "MEMBERS": return target.invokeMembers(exchange.getMessage());
        case "register":
        case "REGISTER": target.invokeRegister(exchange.getMessage()); return null;
        case "services":
        case "SERVICES": return target.invokeServices(exchange.getMessage());
        default: return null;
        }
    }

}

