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

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

    @Override
    public Object invoke(Object obj, String key, Exchange exchange, AsyncCallback callback) throws Exception {
        org.apache.camel.component.consul.endpoint.ConsulEventProducer target = (org.apache.camel.component.consul.endpoint.ConsulEventProducer) obj;
        switch (key) {
        case "fire":
        case "FIRE": target.fire(exchange.getMessage()); return null;
        case "list":
        case "LIST": target.list(exchange.getMessage()); return null;
        default: return null;
        }
    }

}

