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

org.enodeframework.messaging.impl.DefaultMessageProcessContext Maven / Gradle / Ivy

There is a newer version: 1.1.10
Show newest version
package org.enodeframework.messaging.impl;

import org.enodeframework.common.io.Task;
import org.enodeframework.eventing.IEventProcessContext;
import org.enodeframework.queue.IMessageContext;
import org.enodeframework.queue.QueueMessage;

import java.util.concurrent.CompletableFuture;

/**
 * @author [email protected]
 */
public class DefaultMessageProcessContext implements IEventProcessContext {
    protected final QueueMessage queueMessage;
    protected final IMessageContext messageContext;

    public DefaultMessageProcessContext(QueueMessage queueMessage, IMessageContext messageContext) {
        this.queueMessage = queueMessage;
        this.messageContext = messageContext;
    }

    @Override
    public CompletableFuture notifyEventProcessed() {
        messageContext.onMessageHandled(queueMessage);
        return Task.completedTask;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy