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

org.fabric3.spi.container.builder.DirectConnectionFactory Maven / Gradle / Ivy

There is a newer version: 3.1.0
Show newest version
package org.fabric3.spi.container.builder;

import java.net.URI;
import java.util.List;
import java.util.function.Supplier;

/**
 * Returns a direct connection to a channel.
 *
 * Direct connections use the underlying channel dispatch API, for example, a ring buffer for collocated channels or the underlying transport API for bindings.
 */
public interface DirectConnectionFactory {

    /**
     * Returns the connection types this factory provides.
     *
     * @return the connection types
     */
    List> getTypes();

    /**
     * Returns a direct connection to the channel.
     *
     * @param channelUri the channel URI
     * @param attachUri  the producer or consumer URI; together with the channel URI, these two values form a unique key
     * @param type       the connection type
     * @return a supplier of the connection
     */
     Supplier getConnection(URI channelUri, URI attachUri, Class type);

    /**
     * Returns a direct connection to the channel topic.
     *
     * @param channelUri the channel URI
     * @param attachUri  the producer or consumer URI; together with the channel URI, these two values form a unique key
     * @param type       the connection type
     * @param topic      the topic name
     * @return a supplier of the connection
     */
     Supplier getConnection(URI channelUri, URI attachUri, Class type, String topic);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy