org.enodeframework.messaging.impl.DefaultMessageProcessContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of enode Show documentation
Show all versions of enode Show documentation
The enodeframework core implementation.
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;
}
}