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

org.reactivecommons.async.commons.EventExecutor Maven / Gradle / Ivy

There is a newer version: 5.2.2
Show newest version
package org.reactivecommons.async.commons;

import lombok.AllArgsConstructor;
import org.reactivecommons.async.api.handlers.EventHandler;
import org.reactivecommons.async.commons.communications.Message;
import reactor.core.publisher.Mono;

import java.util.function.Function;

@AllArgsConstructor
public class EventExecutor {
    private final EventHandler eventHandler;
    private final Function converter;

    public Mono execute(Message rawMessage) {
        return eventHandler.handle(converter.apply(rawMessage));
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy