All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.vlingo.lattice.exchange.camel.CoveyFactory Maven / Gradle / Ivy

// Copyright © 2012-2020 VLINGO LABS. All rights reserved.
//
// This Source Code Form is subject to the terms of the
// Mozilla Public License, v. 2.0. If a copy of the MPL
// was not distributed with this file, You can obtain
// one at https://mozilla.org/MPL/2.0/.

package io.vlingo.lattice.exchange.camel;

import io.vlingo.lattice.exchange.Covey;
import io.vlingo.lattice.exchange.ExchangeReceiver;
import io.vlingo.lattice.exchange.ExchangeSender;
import io.vlingo.lattice.exchange.camel.adapter.AbstractCamelExchangeAdapter;
import org.apache.camel.Exchange;

/**
 * A factory that produces Exchange {@code io.vlingo.lattice.exchange.Covey} instances to be used with {@code io.vlingo.lattice.exchange.camel.CamelExchange}.
 */
public final class CoveyFactory {
  private CoveyFactory() {
    //prevent instantiation
  }

  /**
   * Build an exchange {@code io.vlingo.lattice.exchange.Covey} to be used with {@code io.vlingo.lattice.exchange.camel.CamelExchange}.
   *
   * @param  the local object type
   * @param  the external object type
   */
  public static  Covey build(final ExchangeSender sender, final ExchangeReceiver receiver,
                                                   final AbstractCamelExchangeAdapter adapter, final Class localClass, final Class externalClass) {

    return new Covey<>(sender, receiver, adapter, localClass, externalClass, Exchange.class);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy