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

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

    @Override
    public Object invoke(Object obj, String key, Exchange exchange, AsyncCallback callback) throws Exception {
        org.apache.camel.component.consul.endpoint.ConsulCoordinatesProducer target = (org.apache.camel.component.consul.endpoint.ConsulCoordinatesProducer) obj;
        switch (key) {
        case "datacenters":
        case "DATACENTERS": target.datacenters(exchange.getMessage()); return null;
        case "nodes":
        case "NODES": target.nodes(exchange.getMessage()); return null;
        default: return null;
        }
    }

}

