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

import org.apache.camel.AsyncCallback;
import org.apache.camel.Exchange;
import org.apache.camel.spi.InvokeOnHeaderStrategy;
import org.apache.camel.component.infinispan.remote.InfinispanRemoteProducer;

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

    @Override
    public Object invoke(Object obj, String key, Exchange exchange, AsyncCallback callback) throws Exception {
        org.apache.camel.component.infinispan.remote.InfinispanRemoteProducer target = (org.apache.camel.component.infinispan.remote.InfinispanRemoteProducer) 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;
        }
    }

}

