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

import org.apache.camel.AsyncCallback;
import org.apache.camel.Exchange;
import org.apache.camel.spi.InvokeOnHeaderStrategy;
import org.apache.camel.component.atomix.client.value.AtomixValueProducer;

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

    @Override
    public Object invoke(Object obj, String key, Exchange exchange, AsyncCallback callback) throws Exception {
        org.apache.camel.component.atomix.client.value.AtomixValueProducer target = (org.apache.camel.component.atomix.client.value.AtomixValueProducer) obj;
        switch (key) {
        case "compare_and_set":
        case "COMPARE_AND_SET": target.onCompareAndSet(exchange.getMessage(), callback); return callback;
        case "get":
        case "GET": target.onGet(exchange.getMessage(), callback); return callback;
        case "get_and_set":
        case "GET_AND_SET": target.onGetAndSet(exchange.getMessage(), callback); return callback;
        case "set":
        case "SET": target.onSet(exchange.getMessage(), callback); return callback;
        default: return null;
        }
    }

}

