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

de.otto.synapse.eventsource.EventSourceBuilder Maven / Gradle / Ivy

Go to download

A library used at otto.de to implement Spring Boot based event-sourcing microservices.

There is a newer version: 0.33.1
Show newest version
package de.otto.synapse.eventsource;

import de.otto.synapse.channel.selector.Selector;
import de.otto.synapse.endpoint.Selectable;
import de.otto.synapse.endpoint.receiver.MessageLogReceiverEndpoint;

/**
 * A builder used to build {@link EventSource instances}.
 */
public interface EventSourceBuilder extends Selectable {

    /**
     * Should build an event source for a given stream name. Classes that implement this interface use this differently
     * depending on their specific event queuing tech.
     *
     * @param messageLogReceiverEndpoint the MessageLogReceiverEndpoint used to consume
     * @return EventSource implementation for this specific technology
     */
    EventSource buildEventSource(final MessageLogReceiverEndpoint messageLogReceiverEndpoint);

    @Override
    default boolean matches(final Class channelSelector) {
        return channelSelector.isAssignableFrom(selector());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy