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

import org.apache.camel.AsyncCallback;
import org.apache.camel.Exchange;
import org.apache.camel.spi.InvokeOnHeaderStrategy;
import org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedProducer;

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

    @Override
    public Object invoke(Object obj, String key, Exchange exchange, AsyncCallback callback) throws Exception {
        org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedProducer target = (org.apache.camel.component.infinispan.embedded.InfinispanEmbeddedProducer) obj;
        switch (key) {
        case "query":
        case "QUERY": target.onQuery(exchange.getMessage()); return null;
        case "stats":
        case "STATS": target.onStats(exchange.getMessage()); return null;
        default: return null;
        }
    }

}

