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

com.evento.common.messaging.bus.EventoServer Maven / Gradle / Ivy

The newest version!
package com.evento.common.messaging.bus;

import java.io.Serializable;
import java.util.concurrent.CompletableFuture;

/**
 * This interface represents a server for sending and receiving messages in an Evento cluster.
 */
public interface EventoServer {

    /**
     * Sends a message using the EventoServer.
     *
     * @param message the message to be sent
     * @throws SendFailedException if the message sending fails
     */
    void send(Serializable message) throws  SendFailedException;

    /**
     * Sends a request using the EventoServer.
     *
     * @param       the type of the response
     * @param request  the request to be sent
     * @return a CompletableFuture that will be completed with the response
     * @throws SendFailedException if the request sending fails
     */
     CompletableFuture request(Serializable request) throws SendFailedException;

    /**
     * Returns the instance ID of the EventoServer.
     *
     * @return the instance ID
     */
    String getInstanceId();

    /**
     * Returns the bundle ID of the EventoServer.
     *
     * @return the bundle ID
     */
    String getBundleId();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy